X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fkernel_lock.c;h=f73e2f8c308f2e3b17e0cd21b5f0ab7131872f08;hb=cc1bf182bb8451a036a7c227f0a95a0416c4736e;hp=cb5490ec00f20f4fea3640275192f20d942a7fba;hpb=2fc2991175bf77395e6b15fe6b2304d3bf72da40;p=linux-2.6 diff --git a/lib/kernel_lock.c b/lib/kernel_lock.c index cb5490ec00..f73e2f8c30 100644 --- a/lib/kernel_lock.c +++ b/lib/kernel_lock.c @@ -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 @@ -14,7 +14,7 @@ * The 'big kernel semaphore' * * This mutex is taken and released recursively by lock_kernel() - * and unlock_kernel(). It is transparently dropped and reaquired + * and unlock_kernel(). It is transparently dropped and reacquired * over schedule(). It is used to protect legacy code that hasn't * been migrated to a proper locking design yet. * @@ -92,7 +92,7 @@ void __lockfunc unlock_kernel(void) * The 'big kernel lock' * * This spinlock is taken and released recursively by lock_kernel() - * and unlock_kernel(). It is transparently dropped and reaquired + * and unlock_kernel(). It is transparently dropped and reacquired * over schedule(). It is used to protect legacy code that hasn't * been migrated to a proper locking design yet. * @@ -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(); } /*