patch-2.4.22 linux-2.4.22/net/core/dst.c
Next file: linux-2.4.22/net/core/filter.c
Previous file: linux-2.4.22/net/core/dev.c
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
2003-08-25 04:44:44.000000000 -0700
- Orig file:
linux-2.4.21/net/core/dst.c
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.21/net/core/dst.c linux-2.4.22/net/core/dst.c
@@ -105,6 +105,7 @@
if (!dst)
return NULL;
memset(dst, 0, ops->entry_size);
+ atomic_set(&dst->__refcnt, 0);
dst->ops = ops;
dst->lastuse = jiffies;
dst->input = dst_discard;
@@ -131,11 +132,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);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)