Michel Lespinasse 42fc541404 mmap locking API: add mmap_assert_locked() and mmap_assert_write_locked()
Add new APIs to assert that mmap_sem is held.

Using this instead of rwsem_is_locked and lockdep_assert_held[_write]
makes the assertions more tolerant of future changes to the lock type.

Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
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: Laurent Dufour <ldufour@linux.ibm.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-10-walken@google.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-09 09:39:14 -07:00
..
2020-03-27 09:29:56 +00:00
2020-06-05 16:26:36 -07:00
2020-06-01 12:10:17 -07:00
2020-06-05 16:43:16 -07:00
2020-06-02 20:16:55 -07:00
2020-06-05 16:26:36 -07:00
2020-06-08 12:47:09 -07:00
2020-06-02 15:29:19 -07:00
2020-06-02 15:29:19 -07:00
2020-06-02 20:11:35 -07:00
\n
2020-06-04 13:51:54 -07:00
\n
2020-06-04 13:53:10 -07:00
2020-06-05 14:05:57 -07:00
2020-06-02 15:29:19 -07:00
2020-06-04 13:50:13 -07:00
2020-06-02 15:37:03 -07:00
2020-06-02 19:59:25 -07:00
2020-05-14 16:44:25 +02:00
2020-02-07 14:48:35 -05:00
2020-06-05 16:26:36 -07:00
2020-03-05 21:00:40 -05:00
2020-05-14 16:44:24 +02:00
2020-06-03 13:12:57 -07:00
2020-06-02 19:45:12 -07:00
2020-06-02 15:29:19 -07:00
2020-05-14 16:44:24 +02:00
2020-04-09 15:33:09 -04:00