Skip to contentSkip to conversation

mod_timer cleanups for dst.c

PATCH In review Vinay K Nallamothu 2 participants 2 messages May 4, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mod_timer cleanups for dst.c

Hi,

Just reposting what I earlier posted to the linux-kernel mailing list. These are trivial patches converting {del,add}_timer to mod_timer.

Also kindly let me know whether this is the right platform to post the PPP & FR related fixes or to linux-x25 mailing list.

vinay

PS: I am not subscribed to this mailing list

net/core/dst.c +1 -3
@@ -154,11 +154,9 @@
 	dst->next = dst_garbage_list;
 	dst_garbage_list = dst;
 	if (dst_gc_timer_inc > DST_GC_INC) {
-		del_timer(&dst_gc_timer);
 		dst_gc_timer_inc = DST_GC_INC;
 		dst_gc_timer_expires = DST_GC_MIN;
-		dst_gc_timer.expires = jiffies + dst_gc_timer_expires;
-		add_timer(&dst_gc_timer);
+		mod_timer(&dst_gc_timer, jiffies + dst_gc_timer_expires);
 	}
 	spin_unlock_bh(&dst_lock);
 }
#1 lore raw

From: Vinay K Nallamothu <[email protected]>
Date: 04 May 2003 14:55:34 +0530

Just reposting what I earlier posted to the linux-kernel mailing list. These are trivial patches converting {del,add}_timer to mod_timer.

Thanks, this is actually a bug fix. The old code could add_timer() while the timer was active.