From: Andi Kleen Date: Wed, 4 Apr 2012 00:08:25 +0000 (+1000) Subject: futex: use lockdep_assert_held() for lock checking X-Git-Tag: next-20120411~2^2~34 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=2ce69b73d1b843c93d89d564b0db36c5bf096b70 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 --- 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);