linux/drivers/infiniband/sw/siw
Michel Lespinasse d8ed45c5dc mmap locking API: use coccinelle to convert mmap_sem rwsem call sites
This change converts the existing mmap_sem rwsem calls to use the new mmap
locking API instead.

The change is generated using coccinelle with the following rule:

// spatch --sp-file mmap_lock_api.cocci --in-place --include-headers --dir .

@@
expression mm;
@@
(
-init_rwsem
+mmap_init_lock
|
-down_write
+mmap_write_lock
|
-down_write_killable
+mmap_write_lock_killable
|
-down_write_trylock
+mmap_write_trylock
|
-up_write
+mmap_write_unlock
|
-downgrade_write
+mmap_write_downgrade
|
-down_read
+mmap_read_lock
|
-down_read_killable
+mmap_read_lock_killable
|
-down_read_trylock
+mmap_read_trylock
|
-up_read
+mmap_read_unlock
)
-(&mm->mmap_sem)
+(mm)

Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Liam Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ying Han <yinghan@google.com>
Link: http://lkml.kernel.org/r/20200520052908.204642-5-walken@google.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-09 09:39:14 -07:00
..
iwarp.h
Kconfig RDMA/siw: Change CQ flags from 64->32 bits 2019-08-13 12:22:06 -04:00
Makefile
siw_cm.c tcp: add tcp_sock_set_nodelay 2020-05-28 11:11:45 -07:00
siw_cm.h
siw_cq.c RDMA/siw: Simplify QP representation 2020-01-03 15:54:09 -04:00
siw_main.c RDMA: Remove 'max_fmr' 2020-06-02 20:32:54 -03:00
siw_mem.c mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
siw_mem.h RDMA/siw: Fix 64/32bit pointer inconsistency 2019-08-23 12:08:27 -04:00
siw_qp_rx.c RDMA/siw: Suppress uninitialized var warning 2020-03-23 22:22:37 -03:00
siw_qp_tx.c RDMA/siw: Fix potential siw_mem refcnt leak in siw_fastreg_mr() 2020-04-15 11:26:51 -03:00
siw_qp.c RDMA/siw: Simplify QP representation 2020-01-03 15:54:09 -04:00
siw_verbs.c RDMA: Remove 'max_fmr' 2020-06-02 20:32:54 -03:00
siw_verbs.h RDMA/siw: Use the common mmap_xa helpers 2019-11-06 13:08:01 -04:00
siw.h RDMA: Remove 'max_fmr' 2020-06-02 20:32:54 -03:00