stop_machine: Shift the 'done != NULL' check from cpu_stop_signal_done() to callers
commitdd2e3121e3cb16d03a6e3f2db48f260f046f39c2
authorOleg Nesterov <oleg@redhat.com>
Sun, 15 Nov 2015 19:33:29 +0000 (15 20:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 23 Nov 2015 08:48:19 +0000 (23 09:48 +0100)
treed184d7819e46df31dd7088c564e10d6ce213ccf3
parent6fa3b826bcb3309157166e6e523a4be236fe267a
stop_machine: Shift the 'done != NULL' check from cpu_stop_signal_done() to callers

Change cpu_stop_queue_work() and cpu_stopper_thread() to check done != NULL
before cpu_stop_signal_done(done). This makes the code more clean imo, note
that cpu_stopper_thread() has to do this check anyway.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Milos Vyletel <milos@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20151115193329.GA8274@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/stop_machine.c