Skip to content

Commit c2ace36

Browse files
Pan XinhuiIngo Molnar
authored andcommitted
locking/pvqspinlock: Fix a bug in qstat_read()
It's obviously wrong to set stat to NULL. So lets remove it. Otherwise it is always zero when we check the latency of kick/wake. Signed-off-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Waiman Long <Waiman.Long@hpe.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1468405414-3700-1-git-send-email-xinhui.pan@linux.vnet.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 229ce63 commit c2ace36

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/locking/qspinlock_stat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ static ssize_t qstat_read(struct file *file, char __user *user_buf,
153153
*/
154154
if ((counter == qstat_pv_latency_kick) ||
155155
(counter == qstat_pv_latency_wake)) {
156-
stat = 0;
157156
if (kicks)
158157
stat = DIV_ROUND_CLOSEST_ULL(stat, kicks);
159158
}

0 commit comments

Comments
 (0)