aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rcupdate.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2010-03-15 20:03:43 -0400
committerIngo Molnar <mingo@elte.hu>2010-03-16 04:57:49 -0400
commite3818b8dce2a934cd1521dbc4827e5238d8f45d8 (patch)
tree871d73c67a9bfd84b7ed7c49e9d4027eac7e577f /include/linux/rcupdate.h
parenta3d3203e4bb40f253b1541e310dc0f9305be7c84 (diff)
rcu: Make rcu_read_lock_bh_held() allow for disabled BH
Disabling BH can stand in for rcu_read_lock_bh(), and this patch updates rcu_read_lock_bh_held() to allow for this. In order to avoid include-file hell, this function is moved out of line to kernel/rcupdate.c. This fixes a false positive RCU warning. Reported-by: Arnd Bergmann <arnd@arndb.de> Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: dipankar@in.ibm.com Cc: mathieu.desnoyers@polymtl.ca Cc: josh@joshtriplett.org Cc: dvhltc@us.ibm.com Cc: niv@us.ibm.com Cc: peterz@infradead.org Cc: rostedt@goodmis.org Cc: Valdis.Kletnieks@vt.edu Cc: dhowells@redhat.com LKML-Reference: <20100316000343.GA25857@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r--include/linux/rcupdate.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 3024050c82a1..e1bdc4bfd275 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -123,22 +123,11 @@ static inline int rcu_read_lock_held(void)
123 return lock_is_held(&rcu_lock_map); 123 return lock_is_held(&rcu_lock_map);
124} 124}
125 125
126/** 126/*
127 * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? 127 * rcu_read_lock_bh_held() is defined out of line to avoid #include-file
128 * 128 * hell.
129 * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in
130 * an RCU-bh read-side critical section. In absence of CONFIG_PROVE_LOCKING,
131 * this assumes we are in an RCU-bh read-side critical section unless it can
132 * prove otherwise.
133 *
134 * Check rcu_scheduler_active to prevent false positives during boot.
135 */ 129 */
136static inline int rcu_read_lock_bh_held(void) 130extern int rcu_read_lock_bh_held(void);
137{
138 if (!debug_lockdep_rcu_enabled())
139 return 1;
140 return lock_is_held(&rcu_bh_lock_map);
141}
142 131
143/** 132/**
144 * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? 133 * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section?