locking/pvqspinlock: Avoid double resetting of stats
authorDavidlohr Bueso <dave@stgolabs.net>
Mon, 18 Apr 2016 06:31:42 +0000 (23:31 -0700)
committerIngo Molnar <mingo@kernel.org>
Thu, 5 May 2016 07:58:49 +0000 (09:58 +0200)
... remove the redundant second iteration, this is most
likely a copy/past buglet.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
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>
Cc: dave@stgolabs.net
Cc: waiman.long@hpe.com
Link: http://lkml.kernel.org/r/1460961103-24953-2-git-send-email-dave@stgolabs.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/locking/qspinlock_stat.h

index d734b75..7272233 100644 (file)
@@ -191,8 +191,6 @@ static ssize_t qstat_write(struct file *file, const char __user *user_buf,
 
                for (i = 0 ; i < qstat_num; i++)
                        WRITE_ONCE(ptr[i], 0);
-               for (i = 0 ; i < qstat_num; i++)
-                       WRITE_ONCE(ptr[i], 0);
        }
        return count;
 }