vtime: Always debug check snapshot source _before_ updating it
authorFrederic Weisbecker <fweisbec@gmail.com>
Mon, 15 Jul 2013 14:35:55 +0000 (16:35 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Wed, 14 Aug 2013 15:14:56 +0000 (17:14 +0200)
commitaf2350bd12096dfd04e1090b90bfecea1f75f84e
tree838e36dc6f9ec7f2ae237652e1002597c64df070
parentb854fafa4e06c50a92e00b39d75ee62083d986d6
vtime: Always debug check snapshot source _before_ updating it

The vtime delta update performed by get_vtime_delta() always check
that the source of the snapshot is valid.

Meanhile the snapshot updaters that rely on get_vtime_delta() also
set the new snapshot origin. But some of them do this right before
the call to get_vtime_delta(), making its debug check useless.

This is easily fixable by moving the snapshot origin update after
the call to get_vtime_delta(). The order doesn't matter there.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Kevin Hilman <khilman@linaro.org>
kernel/sched/cputime.c