]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
rcu: Remove redundant "if" condition from rcu_gp_is_expedited()
authorPaul E. McKenney <paulmck@linux.ibm.com>
Fri, 5 Jul 2019 15:05:10 +0000 (08:05 -0700)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Mon, 12 Aug 2019 18:25:06 +0000 (11:25 -0700)
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>
kernel/rcu/update.c

index 249517058b136ae61ff71d25fbad06138203d286..64e9cc8609e71483386d17d556d3218c9dc24427 100644 (file)
@@ -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);