diff options
author | Paul E. McKenney <paulmck@linux.ibm.com> | 2019-07-05 08:05:10 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.ibm.com> | 2019-08-12 11:25:06 -0700 |
commit | b823cafa7501f946a37dce5aa1e576a0b2f31ed9 (patch) | |
tree | 06da088fd881e806383351defbb57e862cb7fae4 /kernel/rcu | |
parent | e78a7614f3876ac649b3df608789cb6ef74d0480 (diff) | |
download | linux-b823cafa7501f946a37dce5aa1e576a0b2f31ed9.tar.gz linux-b823cafa7501f946a37dce5aa1e576a0b2f31ed9.tar.bz2 linux-b823cafa7501f946a37dce5aa1e576a0b2f31ed9.zip |
rcu: Remove redundant "if" condition from rcu_gp_is_expedited()
Because rcu_expedited_nesting is initialized to 1 and not decremented
until just before init is spawned, rcu_expedited_nesting is guaranteed
to be non-zero whenever rcu_scheduler_active == RCU_SCHEDULER_INIT.
This commit therefore removes this redundant "if" equality test.
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/update.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index 249517058b13..64e9cc8609e7 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@ -136,8 +136,7 @@ static atomic_t rcu_expedited_nesting = ATOMIC_INIT(1); */ bool rcu_gp_is_expedited(void) { - return rcu_expedited || atomic_read(&rcu_expedited_nesting) || - rcu_scheduler_active == RCU_SCHEDULER_INIT; + return rcu_expedited || atomic_read(&rcu_expedited_nesting); } EXPORT_SYMBOL_GPL(rcu_gp_is_expedited); |