rcu: Convert ULONG_CMP_GE() to time_after() for jiffy comparison
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 10 Apr 2020 21:48:20 +0000 (14:48 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 27 Apr 2020 18:01:16 +0000 (11:01 -0700)
This commit converts the ULONG_CMP_GE() in rcu_gp_fqs_loop() to
time_after() to reflect the fact that it is comparing a timestamp to
the jiffies counter.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c

index 940c62acd14ab03156933a9ba8e19ed5d4c25af4..e5903669e336b4fd0b68832d1fcd20fc07798a17 100644 (file)
@@ -1700,7 +1700,7 @@ static void rcu_gp_fqs_loop(void)
                    !rcu_preempt_blocked_readers_cgp(rnp))
                        break;
                /* If time for quiescent-state forcing, do it. */
-               if (ULONG_CMP_GE(jiffies, rcu_state.jiffies_force_qs) ||
+               if (!time_after(rcu_state.jiffies_force_qs, jiffies) ||
                    (gf & RCU_GP_FLAG_FQS)) {
                        trace_rcu_grace_period(rcu_state.name, rcu_state.gp_seq,
                                               TPS("fqsstart"));