* [PATCH 10/16] userfaultfd: Replace spin_is_locked() with lockdep
[not found] <20181003053902.6910-1-ldr709@gmail.com>
@ 2018-10-03 5:38 ` Lance Roy
0 siblings, 0 replies; only message in thread
From: Lance Roy @ 2018-10-03 5:38 UTC (permalink / raw)
To: linux-kernel; +Cc: Paul E. McKenney, Lance Roy, Alexander Viro, linux-fsdevel
lockdep_assert_held() is better suited to checking locking requirements,
since it won't get confused when someone else holds the lock. This is
also a step towards possibly removing spin_is_locked().
Signed-off-by: Lance Roy <ldr709@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: <linux-fsdevel@vger.kernel.org>
---
fs/userfaultfd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index bfa0ec69f924..a20244ff0027 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -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))
--
2.19.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-10-03 5:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20181003053902.6910-1-ldr709@gmail.com>
2018-10-03 5:38 ` [PATCH 10/16] userfaultfd: Replace spin_is_locked() with lockdep Lance Roy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).