[RFC] [PATCH 1/1]: timers: Change add_timer to use add_timer_on

Krishna Kumar
2008-09-22T04:34:51Z

From: Krishna Kumar <krkumar2@in.ibm.com>

timer: Change add_timer to not check for existing timer.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---

include/linux/timer.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff -ruNp 2.6.27-rc7-org/include/linux/timer.h 2.6.27-rc7-new/include/linux/timer.h
--- 2.6.27-rc7-org/include/linux/timer.h 2008-09-17 17:40:36.000000000 +0530
+++ 2.6.27-rc7-new/include/linux/timer.h 2008-09-17 17:41:50.000000000 +0530
@@ -4,6 +4,7 @@
#include <linux/list.h>
#include <linux/ktime.h>
#include <linux/stddef.h>
+#include <linux/smp.h>
#include <linux/debugobjects.h>

struct tvec_base;
@@ -162,8 +163,7 @@ static inline void timer_stats_timer_cle
*/
static inline void add_timer(struct timer_list *timer)
{
- BUG_ON(timer_pending(timer));
- __mod_timer(timer, timer->expires);
+ add_timer_on(timer, raw_smp_processor_id());
}

#ifdef CONFIG_SMP