]> err.no Git - linux-2.6/blobdiff - lib/kernel_lock.c
Revert "[POWERPC] Disable PCI IO/Mem on a device when resources can't be allocated"
[linux-2.6] / lib / kernel_lock.c
index e713e86811aeb1ff1efdb5d68fabea7a63042c3c..f73e2f8c308f2e3b17e0cd21b5f0ab7131872f08 100644 (file)
@@ -2,7 +2,7 @@
  * lib/kernel_lock.c
  *
  * This is the traditional BKL - big kernel lock. Largely
- * relegated to obsolescense, but used by various less
+ * relegated to obsolescence, but used by various less
  * important (or lazy) subsystems.
  */
 #include <linux/smp_lock.h>
@@ -177,7 +177,12 @@ static inline void __lock_kernel(void)
 
 static inline void __unlock_kernel(void)
 {
-       spin_unlock(&kernel_flag);
+       /*
+        * the BKL is not covered by lockdep, so we open-code the
+        * unlocking sequence (and thus avoid the dep-chain ops):
+        */
+       _raw_spin_unlock(&kernel_flag);
+       preempt_enable();
 }
 
 /*