spinlock: Add spin_lock_bh_nested()
[deliverable/linux.git] / kernel / locking / spinlock.c
index 4b082b5cac9eedfd7c31daef7e8dd02974eedbed..db3ccb1dd614800e006c0a8cfd99b9c40aae124a 100644 (file)
@@ -363,6 +363,14 @@ void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass)
 }
 EXPORT_SYMBOL(_raw_spin_lock_nested);
 
+void __lockfunc _raw_spin_lock_bh_nested(raw_spinlock_t *lock, int subclass)
+{
+       __local_bh_disable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET);
+       spin_acquire(&lock->dep_map, subclass, 0, _RET_IP_);
+       LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
+}
+EXPORT_SYMBOL(_raw_spin_lock_bh_nested);
+
 unsigned long __lockfunc _raw_spin_lock_irqsave_nested(raw_spinlock_t *lock,
                                                   int subclass)
 {
This page took 0.065703 seconds and 5 git commands to generate.