timer: Make try_to_del_timer_sync() the same on SMP and UP
authorYong Zhang <yong.zhang@windriver.com>
Wed, 20 Oct 2010 22:57:31 +0000 (15:57 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 22 Oct 2010 12:46:25 +0000 (14:46 +0200)
commit6f1bc451e6a79470b122a37ee1fc6bbca450f444
treeb4393f6130ae3a9075de509a0e0e9328f3bd3430
parent20f33a03f0cf87e51165f7084f697acfb68e865b
timer: Make try_to_del_timer_sync() the same on SMP and UP

On UP try_to_del_timer_sync() is mapped to del_timer() which does not
take the running timer callback into account, so it has different
semantics.

Remove the SMP dependency of try_to_del_timer_sync() by using
base->running_timer in the UP case as well.

[ tglx: Removed set_running_timer() inline and tweaked the changelog ]

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/timer.h
kernel/timer.c