lockdep: fix debug_lock_alloc
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 11 Aug 2008 20:45:51 +0000 (22:45 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 11 Aug 2008 20:45:51 +0000 (22:45 +0200)
When we enable DEBUG_LOCK_ALLOC but do not enable PROVE_LOCKING and or
LOCK_STAT, lock_alloc() and lock_release() turn into nops, even though
we should be doing hlock checking (check=1).

This causes a false warning and a lockdep self-disable.

Rectify this.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/lockdep.c

index ab933fecd2a181fa245ec72e5303dbfc256e5dbd..1aa91fd6b06ec341897646f2322e35920640f448 100644 (file)
@@ -2935,9 +2935,6 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
 {
        unsigned long flags;
 
-       if (unlikely(!lock_stat && !prove_locking))
-               return;
-
        if (unlikely(current->lockdep_recursion))
                return;
 
@@ -2958,9 +2955,6 @@ void lock_release(struct lockdep_map *lock, int nested,
 {
        unsigned long flags;
 
-       if (unlikely(!lock_stat && !prove_locking))
-               return;
-
        if (unlikely(current->lockdep_recursion))
                return;