Commit 773e3f93577ffb493fb7c39b1a6ecf39b5748e87

Authored by Paul E. McKenney
1 parent b3a084b9b6

rcu: move check from rcu_dereference_bh to rcu_read_lock_bh_held

As suggested by Linus, push the irqs_disabled() down to the
rcu_read_lock_bh_held() level so that all callers get the benefit
of the correct check.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

include/linux/rcupdate.h
... ... @@ -454,7 +454,7 @@
454 454 * Makes rcu_dereference_check() do the dirty work.
455 455 */
456 456 #define rcu_dereference_bh(p) \
457   - rcu_dereference_check(p, rcu_read_lock_bh_held() || irqs_disabled())
  457 + rcu_dereference_check(p, rcu_read_lock_bh_held())
458 458  
459 459 /**
460 460 * rcu_dereference_sched - fetch RCU-protected pointer, checking for RCU-sched
... ... @@ -86,7 +86,7 @@
86 86 {
87 87 if (!debug_lockdep_rcu_enabled())
88 88 return 1;
89   - return in_softirq();
  89 + return in_softirq() || irqs_disabled();
90 90 }
91 91 EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held);
92 92