]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/rcupdate.h
rcu: Make rcu_read_lock_sched_held() take boot time into account
[net-next-2.6.git] / include / linux / rcupdate.h
index 1a4de31bd7b4d76392ed71e76a080bcdbbe20b72..fcea332a84244396072977afbb32e65a902ede05 100644 (file)
@@ -62,6 +62,8 @@ extern int sched_expedited_torture_stats(char *page);
 
 /* Internal to kernel */
 extern void rcu_init(void);
+extern int rcu_scheduler_active;
+extern void rcu_scheduler_starting(void);
 
 #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
 #include <linux/rcutree.h>
@@ -140,7 +142,7 @@ static inline int rcu_read_lock_sched_held(void)
 
        if (debug_locks)
                lockdep_opinion = lock_is_held(&rcu_sched_lock_map);
-       return lockdep_opinion || preempt_count() != 0;
+       return lockdep_opinion || preempt_count() != 0 || !rcu_scheduler_active;
 }
 
 #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */