Skip to content
Commit f70405af authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Chandan Babu R
Browse files

locking: Add rwsem_assert_held() and rwsem_assert_held_write()



Modelled after lockdep_assert_held() and lockdep_assert_held_write(),
but are always active, even when lockdep is disabled.  Of course, they
don't test that _this_ thread is the owner, but it's sufficient to catch
many bugs and doesn't incur the same performance penalty as lockdep.

Acked-by: default avatar"Peter Zijlstra (Intel)" <peterz@infradead.org>
Acked-by: default avatarWaiman Long <longman@redhat.com>
Acked-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatar"Matthew Wilcox (Oracle)" <willy@infradead.org>
Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
parent 49c379d3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment