]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/mutex-debug.c
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6-omap-h63xx.git] / kernel / mutex-debug.c
index 18651641a7b5aa6482e0aa73ce03b5133e6ffa91..841539d72c55cdbb674b7a91786847c37ec5acdb 100644 (file)
@@ -77,6 +77,9 @@ void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter,
 
 void debug_mutex_unlock(struct mutex *lock)
 {
+       if (unlikely(!debug_locks))
+               return;
+
        DEBUG_LOCKS_WARN_ON(lock->owner != current_thread_info());
        DEBUG_LOCKS_WARN_ON(lock->magic != lock);
        DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next);