]> err.no Git - linux-2.6/blobdiff - net/core/dst.c
Merge branch 'pending' of master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev
[linux-2.6] / net / core / dst.c
index 5c6cfc4e7fdbe2bcaf393b9e1692834cfe3c0b74..7deef483c79f263959c0c1dac148529ecc80d73c 100644 (file)
@@ -165,7 +165,7 @@ void * dst_alloc(struct dst_ops * ops)
        struct dst_entry * dst;
 
        if (ops->gc && atomic_read(&ops->entries) > ops->gc_thresh) {
-               if (ops->gc())
+               if (ops->gc(ops))
                        return NULL;
        }
        dst = kmem_cache_zalloc(ops->kmem_cachep, GFP_ATOMIC);
@@ -284,8 +284,8 @@ static inline void dst_ifdown(struct dst_entry *dst, struct net_device *dev,
                dev_put(dev);
                if (dst->neighbour && dst->neighbour->dev == dev) {
                        dst->neighbour->dev = dst->dev;
+                       dev_hold(dst->dev);
                        dev_put(dev);
-                       dev_hold(dst->neighbour->dev);
                }
        }
 }