lkml.org 
[lkml]   [2012]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/11] futex: Use lockdep_assert_held() for lock checking
Date
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


\
 
 \ /
  Last update: 2012-03-16 20:05    [W:0.083 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site