]> Pileus Git - ~andy/linux/blobdiff - net/core/dst.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw
[~andy/linux] / net / core / dst.c
index 43d94cedbf7c075e5c38dd124d9e91aec8143739..069d51d29414a3245f9b60b66c534f78ce3b1752 100644 (file)
@@ -94,7 +94,7 @@ loop:
                         * But we do not have state "obsoleted, but
                         * referenced by parent", so it is right.
                         */
-                       if (dst->obsolete > 1)
+                       if (dst->obsolete > 0)
                                continue;
 
                        ___dst_free(dst);
@@ -152,7 +152,7 @@ EXPORT_SYMBOL(dst_discard);
 const u32 dst_default_metrics[RTAX_MAX];
 
 void *dst_alloc(struct dst_ops *ops, struct net_device *dev,
-               int initial_ref, int initial_obsolete, int flags)
+               int initial_ref, int initial_obsolete, unsigned short flags)
 {
        struct dst_entry *dst;
 
@@ -171,7 +171,6 @@ void *dst_alloc(struct dst_ops *ops, struct net_device *dev,
        dst_init_metrics(dst, dst_default_metrics, true);
        dst->expires = 0UL;
        dst->path = dst;
-       RCU_INIT_POINTER(dst->_neighbour, NULL);
 #ifdef CONFIG_XFRM
        dst->xfrm = NULL;
 #endif
@@ -188,6 +187,7 @@ void *dst_alloc(struct dst_ops *ops, struct net_device *dev,
        dst->__use = 0;
        dst->lastuse = jiffies;
        dst->flags = flags;
+       dst->pending_confirm = 0;
        dst->next = NULL;
        if (!(flags & DST_NOCOUNT))
                dst_entries_add(ops, 1);
@@ -202,7 +202,7 @@ static void ___dst_free(struct dst_entry *dst)
         */
        if (dst->dev == NULL || !(dst->dev->flags&IFF_UP))
                dst->input = dst->output = dst_discard;
-       dst->obsolete = 2;
+       dst->obsolete = DST_OBSOLETE_DEAD;
 }
 
 void __dst_free(struct dst_entry *dst)
@@ -224,19 +224,12 @@ EXPORT_SYMBOL(__dst_free);
 struct dst_entry *dst_destroy(struct dst_entry * dst)
 {
        struct dst_entry *child;
-       struct neighbour *neigh;
 
        smp_rmb();
 
 again:
-       neigh = rcu_dereference_protected(dst->_neighbour, 1);
        child = dst->child;
 
-       if (neigh) {
-               RCU_INIT_POINTER(dst->_neighbour, NULL);
-               neigh_release(neigh);
-       }
-
        if (!(dst->flags & DST_NOCOUNT))
                dst_entries_add(dst->ops, -1);
 
@@ -360,19 +353,9 @@ static void dst_ifdown(struct dst_entry *dst, struct net_device *dev,
        if (!unregister) {
                dst->input = dst->output = dst_discard;
        } else {
-               struct neighbour *neigh;
-
                dst->dev = dev_net(dst->dev)->loopback_dev;
                dev_hold(dst->dev);
                dev_put(dev);
-               rcu_read_lock();
-               neigh = dst_get_neighbour_noref(dst);
-               if (neigh && neigh->dev == dev) {
-                       neigh->dev = dst->dev;
-                       dev_hold(dst->dev);
-                       dev_put(dev);
-               }
-               rcu_read_unlock();
        }
 }