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
..
2020-05-05 15:19:09 +01:00
2020-06-01 15:18:27 -07:00
2020-05-21 12:59:26 +01:00
2020-03-25 11:50:48 +01:00
2019-04-04 18:41:12 +02:00
2019-06-19 17:09:07 +02:00
2020-06-09 09:39:13 -07:00
2019-06-19 17:09:07 +02:00
2020-04-27 02:07:40 -04:00
2020-06-03 15:13:47 -07:00
2019-07-08 09:54:55 -07:00
2020-06-03 15:13:47 -07:00
2020-03-24 17:24:19 +00:00
2019-06-19 17:09:55 +02:00
2020-05-04 12:46:03 +01:00
2020-05-28 18:00:51 +01:00
2020-03-24 17:24:19 +00:00
2020-05-28 18:00:51 +01:00
2020-05-11 14:29:10 +01:00
2019-06-19 17:09:55 +02:00
2020-05-18 17:51:20 +01:00
2020-06-01 15:18:27 -07:00
2020-06-01 15:18:27 -07:00
2020-05-28 18:03:40 +01:00
2019-07-12 11:05:46 -07:00
2020-05-28 18:00:51 +01:00
2020-05-04 12:46:03 +01:00
2020-05-18 17:47:50 +01:00
2020-05-28 18:03:40 +01:00
2020-04-27 02:07:40 -04:00
2019-11-06 14:17:36 +00:00
2020-06-09 09:39:13 -07:00
2020-05-04 12:46:03 +01:00
2020-06-09 09:39:14 -07:00
2019-11-25 19:40:40 -08:00
2020-05-04 12:46:03 +01:00
2020-04-28 13:55:16 +01:00
2019-08-14 17:18:15 +01:00
2020-05-28 18:00:51 +01:00
2019-06-19 17:09:07 +02:00
2019-07-08 09:54:55 -07:00
2019-06-19 17:09:07 +02:00
2020-06-09 09:39:13 -07:00
2020-01-08 17:05:23 +00:00
2019-06-19 17:09:07 +02:00
2019-07-15 09:20:24 -03:00
2020-04-30 21:31:22 +01:00
2020-05-11 12:02:14 +01:00
2020-05-15 16:35:50 +01:00
2019-11-06 14:17:35 +00:00
2019-11-06 14:17:35 +00:00
2020-05-20 19:10:37 +01:00
2020-05-01 16:28:59 +01:00
2019-07-22 11:44:08 +01:00
2020-03-17 22:50:30 +00:00
2018-04-19 13:29:54 +02:00
2020-03-18 09:50:19 +00:00
2020-06-09 09:39:11 -07:00
2019-10-25 16:29:11 +01:00
2020-06-09 09:39:13 -07:00
2019-06-19 17:09:55 +02:00
2020-05-04 12:46:03 +01:00
2020-05-04 12:46:03 +01:00
2019-08-01 15:00:26 +01:00
2020-05-18 17:47:48 +01:00
2020-06-01 15:18:27 -07:00
2020-03-24 17:24:19 +00:00
2020-01-14 17:11:46 +00:00
2020-03-16 17:19:48 +00:00
2019-04-23 18:01:57 +01:00
2020-05-28 18:00:51 +01:00
2020-05-04 12:46:03 +01:00
2019-08-13 18:32:15 +01:00
2020-06-09 09:39:13 -07:00
2020-01-08 17:27:41 +00:00
2020-03-18 09:50:20 +00:00
2020-06-09 09:39:13 -07:00
2019-06-19 17:09:08 +02:00
2019-10-28 09:13:21 +00:00
2019-06-19 17:09:07 +02:00
2020-03-16 17:19:48 +00:00
2020-02-12 17:26:38 +00:00
2020-03-06 16:02:50 +00:00
2020-06-09 09:39:14 -07:00
2020-06-09 09:39:14 -07:00
2020-06-09 09:39:13 -07:00