From 3d62d5bfc2f659063f1d6920bb62fd3a521b1554 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Wed, 25 Apr 2012 11:03:51 +1000 Subject: [PATCH] futex: use lockdep_assert_held() for lock checking Use lockdep_assert_held() for lock checking instead of a strange homegrown variant. This removes the return for this case, but that is unlikely to be useful anyway. Signed-off-by: Andi Kleen Cc: Thomas Gleixner Cc: Darren Hart Cc: Peter Zijlstra Signed-off-by: Andrew Morton --- kernel/futex.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/futex.c b/kernel/futex.c index e2b0fb9a0b3b..78cff326facc 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -824,8 +824,9 @@ static void __unqueue_futex(struct futex_q *q) { struct futex_hash_bucket *hb; - if (WARN_ON_SMP(!q->lock_ptr || !spin_is_locked(q->lock_ptr)) - || WARN_ON(plist_node_empty(&q->list))) + if (q->lock_ptr) + lockdep_assert_held(q->lock_ptr); + if (WARN_ON(plist_node_empty(&q->list))) return; hb = container_of(q->lock_ptr, struct futex_hash_bucket, lock); -- 2.39.5