diff options
Diffstat (limited to 'kernel/locking/mutex-debug.c')
-rw-r--r-- | kernel/locking/mutex-debug.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/kernel/locking/mutex-debug.c b/kernel/locking/mutex-debug.c index 9c951fade415..9aa713629387 100644 --- a/kernel/locking/mutex-debug.c +++ b/kernel/locking/mutex-debug.c | |||
@@ -73,21 +73,8 @@ void debug_mutex_unlock(struct mutex *lock) | |||
73 | { | 73 | { |
74 | if (likely(debug_locks)) { | 74 | if (likely(debug_locks)) { |
75 | DEBUG_LOCKS_WARN_ON(lock->magic != lock); | 75 | DEBUG_LOCKS_WARN_ON(lock->magic != lock); |
76 | |||
77 | if (!lock->owner) | ||
78 | DEBUG_LOCKS_WARN_ON(!lock->owner); | ||
79 | else | ||
80 | DEBUG_LOCKS_WARN_ON(lock->owner != current); | ||
81 | |||
82 | DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next); | 76 | DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next); |
83 | } | 77 | } |
84 | |||
85 | /* | ||
86 | * __mutex_slowpath_needs_to_unlock() is explicitly 0 for debug | ||
87 | * mutexes so that we can do it here after we've verified state. | ||
88 | */ | ||
89 | mutex_clear_owner(lock); | ||
90 | atomic_set(&lock->count, 1); | ||
91 | } | 78 | } |
92 | 79 | ||
93 | void debug_mutex_init(struct mutex *lock, const char *name, | 80 | void debug_mutex_init(struct mutex *lock, const char *name, |