Skip to content

Commit

Permalink
userfaultfd: Replace spin_is_locked() with lockdep
Browse files Browse the repository at this point in the history
lockdep_assert_held() is better suited to checking locking requirements,
since it only checks if the current thread holds the lock regardless of
whether someone else does. This is also a step towards possibly removing
spin_is_locked().

Signed-off-by: Lance Roy <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
ldr709 authored and Paul E. McKenney committed Nov 12, 2018
1 parent 97eeebe commit 456a737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/userfaultfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ static inline struct userfaultfd_wait_queue *find_userfault_in(
wait_queue_entry_t *wq;
struct userfaultfd_wait_queue *uwq;

VM_BUG_ON(!spin_is_locked(&wqh->lock));
lockdep_assert_held(&wqh->lock);

uwq = NULL;
if (!waitqueue_active(wqh))
Expand Down

0 comments on commit 456a737

Please sign in to comment.