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