]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
rcu: Move rcu_gp_in_progress() to ->gp_seq
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sat, 28 Apr 2018 04:25:01 +0000 (21:25 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 12 Jul 2018 21:27:52 +0000 (14:27 -0700)
This commit makes rcu_gp_in_progress() use ->gp_seq instead of
->completed and ->gpnum.  The READ_ONCE() invocations are buried
in rcu_seq_current().

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c

index b3af3d24286cea95bfaa70e989c384f5b103eac1..56445f4c09a80efe5f024e1ddf5dcb939f1c64ad 100644 (file)
@@ -219,7 +219,7 @@ unsigned long rcu_rnp_online_cpus(struct rcu_node *rnp)
  */
 static int rcu_gp_in_progress(struct rcu_state *rsp)
 {
-       return READ_ONCE(rsp->completed) != READ_ONCE(rsp->gpnum);
+       return rcu_seq_state(rcu_seq_current(&rsp->gp_seq));
 }
 
 /*