[ARM] dma: remove dmach_t typedef
[safe/jmp/linux-2.6] / net / core / dst.c
index 694cd2a..09c1530 100644 (file)
@@ -203,6 +203,7 @@ void __dst_free(struct dst_entry * dst)
        if (dst_garbage.timer_inc > DST_GC_INC) {
                dst_garbage.timer_inc = DST_GC_INC;
                dst_garbage.timer_expires = DST_GC_MIN;
+               cancel_delayed_work(&dst_gc_work);
                schedule_delayed_work(&dst_gc_work, dst_garbage.timer_expires);
        }
        spin_unlock_bh(&dst_garbage.lock);
@@ -259,6 +260,16 @@ again:
        return NULL;
 }
 
+void dst_release(struct dst_entry *dst)
+{
+       if (dst) {
+               WARN_ON(atomic_read(&dst->__refcnt) < 1);
+               smp_mb__before_atomic_dec();
+               atomic_dec(&dst->__refcnt);
+       }
+}
+EXPORT_SYMBOL(dst_release);
+
 /* Dirty hack. We did it in 2.2 (in __dst_free),
  * we have _very_ good reasons not to repeat
  * this mistake in 2.3, but we have no choice