On Thu, 26 Mar 2020, Michel Lespinasse wrote:
Use lockdep_assert_held when asserting that mmap_sem is held. Using this instead of rwsem_is_locked makes the assertions more tolerant of future changes to the lock type.
Not opposing here, just worth mentioning that the coverage surface is greatly reduced, lockdep not being very popular in production. Thanks, Davidlohr