Skip to content

Commit

Permalink
srcu: Fix rcutorture-statistics typo
Browse files Browse the repository at this point in the history
The function srcutorture_get_gp_data() duplicated the check for
sp->batch_check0.head instead of also checking sp->batch_check1.head.
The only effect of this typo would be for rcutorture statistics to
understate the fraction of time that an SRCU grace period was in flight,
and only for Classic SRCU.  This commit fixes this typo.

Reported-by: David Binderman <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
paulmck committed Jun 9, 2017
1 parent 41a2901 commit 7f0cd63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/rcu/rcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ static inline void srcutorture_get_gp_data(enum rcutorture_type test_type,
*flags = 0;
*completed = sp->completed;
*gpnum = *completed;
if (sp->batch_queue.head || sp->batch_check0.head || sp->batch_check0.head)
if (sp->batch_queue.head || sp->batch_check0.head || sp->batch_check1.head)
(*gpnum)++;
}

Expand Down

0 comments on commit 7f0cd63

Please sign in to comment.