summaryrefslogtreecommitdiffstats
path: root/kernel/locking
diff options
context:
space:
mode:
authorPan Xinhui <xinhui.pan@linux.vnet.ibm.com>2016-07-13 18:23:34 +0800
committerIngo Molnar <mingo@kernel.org>2016-08-10 14:13:29 +0200
commitc2ace36b884de9330c4149064ae8d212d2e0d9ee (patch)
treebd9ffc016134a9315c1d8b65502483298b6a0238 /kernel/locking
parent229ce631574761870a2ac938845fadbd07f35caa (diff)
downloadlinux-stable-c2ace36b884de9330c4149064ae8d212d2e0d9ee.tar.gz
linux-stable-c2ace36b884de9330c4149064ae8d212d2e0d9ee.tar.bz2
linux-stable-c2ace36b884de9330c4149064ae8d212d2e0d9ee.zip
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>
Diffstat (limited to 'kernel/locking')
-rw-r--r--kernel/locking/qspinlock_stat.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/locking/qspinlock_stat.h b/kernel/locking/qspinlock_stat.h
index 22e025309845..b9d031516254 100644
--- a/kernel/locking/qspinlock_stat.h
+++ b/kernel/locking/qspinlock_stat.h
@@ -153,7 +153,6 @@ static ssize_t qstat_read(struct file *file, char __user *user_buf,
*/
if ((counter == qstat_pv_latency_kick) ||
(counter == qstat_pv_latency_wake)) {
- stat = 0;
if (kicks)
stat = DIV_ROUND_CLOSEST_ULL(stat, kicks);
}