]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rcu: Move common code out of if-else block
authorAkira Yokosawa <akiyks@gmail.com>
Sat, 2 Mar 2019 08:25:19 +0000 (17:25 +0900)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 26 Mar 2019 21:37:49 +0000 (14:37 -0700)
As the result of recent addition of "rdp->core_needs_qs = false;" in
the "if" block, now both branches of the if-else have the same
assignment.

Factor it out and reduce line count.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Joel Fernandes <joel@joelfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Acked-by: Joel Fernandes (Google) <joel@joelfernandes.org>
kernel/rcu/tree.c

index 296131450414e3ebad22b9127c9b6f845005eac1..5aefd36ac648ac6f3f977381b405fddeadab8098 100644 (file)
@@ -2295,12 +2295,10 @@ rcu_report_qs_rdp(int cpu, struct rcu_data *rdp)
                return;
        }
        mask = rdp->grpmask;
+       rdp->core_needs_qs = false;
        if ((rnp->qsmask & mask) == 0) {
-               rdp->core_needs_qs = false;
                raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
        } else {
-               rdp->core_needs_qs = false;
-
                /*
                 * This GP can't end until cpu checks in, so all of our
                 * callbacks can be processed during the next GP.