Messages in this thread Patch in this message | | | From | Andi Kleen <> | Subject | [PATCH 07/11] futex: Use lockdep_assert_held() for lock checking | Date | Fri, 16 Mar 2012 12:01:00 -0700 |
| |
From: Andi Kleen <ak@linux.intel.com>
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 anyways.
Signed-off-by: Andi Kleen <ak@linux.intel.com> --- kernel/futex.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/futex.c b/kernel/futex.c index 1614be2..a77dda7 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -823,8 +823,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); -- 1.7.7.6
| |