From: Andi Kleen Date: Wed, 25 Apr 2012 01:03:51 +0000 (+1000) Subject: futex: use lockdep_assert_held() for lock checking X-Git-Tag: next-20120430~2^2~102 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3d62d5bfc2f659063f1d6920bb62fd3a521b1554;p=karo-tx-linux.git 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);