Commit c2ace36b authored by Pan Xinhui's avatar Pan Xinhui Committed by Ingo Molnar

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: default avatarPan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarWaiman 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.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 229ce631
...@@ -153,7 +153,6 @@ static ssize_t qstat_read(struct file *file, char __user *user_buf, ...@@ -153,7 +153,6 @@ static ssize_t qstat_read(struct file *file, char __user *user_buf,
*/ */
if ((counter == qstat_pv_latency_kick) || if ((counter == qstat_pv_latency_kick) ||
(counter == qstat_pv_latency_wake)) { (counter == qstat_pv_latency_wake)) {
stat = 0;
if (kicks) if (kicks)
stat = DIV_ROUND_CLOSEST_ULL(stat, kicks); stat = DIV_ROUND_CLOSEST_ULL(stat, kicks);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment