diff options
author | Lai Jiangshan <laijs@linux.alibaba.com> | 2019-11-15 23:08:53 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-01-24 19:27:33 +0100 |
commit | 77339e61aa309310a535bd01eb3388f7a27b36f9 (patch) | |
tree | 3f6131016b7c8105c97ffc15364b3031374213cf /kernel/rcu/tree_exp.h | |
parent | rcu: Use READ_ONCE() for ->expmask in rcu_read_unlock_special() (diff) | |
download | linux-77339e61aa309310a535bd01eb3388f7a27b36f9.tar.xz linux-77339e61aa309310a535bd01eb3388f7a27b36f9.zip |
rcu: Provide wrappers for uses of ->rcu_read_lock_nesting
This commit provides wrapper functions for uses of ->rcu_read_lock_nesting
to improve readability and to ease future changes to support inlining
of __rcu_read_lock() and __rcu_read_unlock().
Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tree_exp.h')
-rw-r--r-- | kernel/rcu/tree_exp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h index 98d078cafa5a..d8da6b1a3209 100644 --- a/kernel/rcu/tree_exp.h +++ b/kernel/rcu/tree_exp.h @@ -610,7 +610,7 @@ static void rcu_exp_handler(void *unused) * critical section. If also enabled or idle, immediately * report the quiescent state, otherwise defer. */ - if (!t->rcu_read_lock_nesting) { + if (!rcu_preempt_depth()) { if (!(preempt_count() & (PREEMPT_MASK | SOFTIRQ_MASK)) || rcu_dynticks_curr_cpu_in_eqs()) { rcu_report_exp_rdp(rdp); @@ -634,7 +634,7 @@ static void rcu_exp_handler(void *unused) * can have caused this quiescent state to already have been * reported, so we really do need to check ->expmask. */ - if (t->rcu_read_lock_nesting > 0) { + if (rcu_preempt_depth() > 0) { raw_spin_lock_irqsave_rcu_node(rnp, flags); if (rnp->expmask & rdp->grpmask) { rdp->exp_deferred_qs = true; |