Skip to content

Commit

Permalink
rcu: Add memory barriers
Browse files Browse the repository at this point in the history
Add the memory barriers added by e59fb31.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  • Loading branch information
Paul E. McKenney committed May 26, 2011
1 parent ba9f207 commit 0bbcc52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,12 @@ static void rcu_report_qs_rsp(struct rcu_state *rsp, unsigned long flags)
unsigned long gp_duration;

WARN_ON_ONCE(!rcu_gp_in_progress(rsp));

/*
* Ensure that all grace-period and pre-grace-period activity
* is seen before the assignment to rsp->completed.
*/
smp_mb(); /* See above block comment. */
gp_duration = jiffies - rsp->gp_start;
if (gp_duration > rsp->gp_max)
rsp->gp_max = gp_duration;
Expand Down

0 comments on commit 0bbcc52

Please sign in to comment.