patch-2.4.0-test7 linux/kernel/timer.c

Next file: linux/lib/cmdline.c
Previous file: linux/kernel/signal.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test6/linux/kernel/timer.c linux/kernel/timer.c
@@ -180,17 +180,15 @@
 	unsigned long flags;
 
 	spin_lock_irqsave(&timerlist_lock, flags);
-	if (timer->list.next)
+	if (timer_pending(timer))
 		goto bug;
 	internal_add_timer(timer);
-out:
 	spin_unlock_irqrestore(&timerlist_lock, flags);
 	return;
-
 bug:
+	spin_unlock_irqrestore(&timerlist_lock, flags);
 	printk("bug: kernel timer added twice at %p.\n",
 			__builtin_return_address(0));
-	goto out;
 }
 
 static inline int detach_timer (struct timer_list *timer)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)