srcu: Fix rcutorture-statistics typo
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 15 May 2017 00:06:30 +0000 (17:06 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 9 Jun 2017 01:52:42 +0000 (18:52 -0700)
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 <dcb314@hotmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/rcu.h

index bc55b5716c37d0b652d3660383db12a4ef307567..27f871c88e0ac53db34e7b9aec18e4ed5093b6ae 100644 (file)
@@ -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)++;
 }