]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
linuxkpi: Add mmap_lock.h
authorEmmanuel Vadot <manu@FreeBSD.org>
Wed, 16 Feb 2022 10:26:14 +0000 (11:26 +0100)
committerEmmanuel Vadot <manu@FreeBSD.org>
Sat, 5 Mar 2022 11:12:44 +0000 (12:12 +0100)
commit61b0043efb8c14aac1db81e5c4254b5b0bacc255
treed2aaa605e2ee8f9229a3475a017ddd0a861b032d
parentec504d3049a06483ee441ef64318623caf7a5975
linuxkpi: Add mmap_lock.h

This contain mmap_read_lock, mmap_read_unlock and mmap_write_lock_killable
which are abstraction around down_read, up_read and down_write_killable.
Note that in Linux 5.8 mmap_sem was renamed to mmap_lock.
We might want to do the same at some point but some drivers still uses
the old mmap locking API.

Reviewed by: bz
MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D34297

(cherry picked from commit 995c3b88d485b9b64ab94efe270d424b2526ade7)
sys/compat/linuxkpi/common/include/linux/mm.h
sys/compat/linuxkpi/common/include/linux/mm_types.h
sys/compat/linuxkpi/common/include/linux/mmap_lock.h [new file with mode: 0644]