Move source tree closer to the 2.6.32.17 mainline
/kernel/mutex.c
blob:947b3ad551f8a925c39ef6f53f4f37c16f8a3ea3 -> blob:f85644c878dd66b70101de3d504ddfdf6e46d32f
--- kernel/mutex.c
+++ kernel/mutex.c
@@ -172,6 +172,13 @@ __mutex_lock_common(struct mutex *lock,
struct thread_info *owner;
/*
+ * If we own the BKL, then don't spin. The owner of
+ * the mutex might be waiting on us to release the BKL.
+ */
+ if (unlikely(current->lock_depth >= 0))
+ break;
+
+ /*
* If there's an owner, wait for it to either
* release the lock or go to sleep.
*/