Re: [PATCH v6 09/12] mmap locking API: add mmap_assert_locked() and mmap_assert_write_locked()

From: Vlastimil Babka
Date: Thu May 21 2020 - 03:35:41 EST


On 5/20/20 7:29 AM, Michel Lespinasse wrote:
> 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@xxxxxxxxxx>

Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>