ndisc: Remove tbl argument for __ipv6_neigh_lookup().
[deliverable/linux.git] / net / ipv6 / route.c
index 7c34c01b515b7ac370f8021ba6f5ec4c654e9e41..5d9ca274d149cb5e8f3a469b7089292a6c3ec665 100644 (file)
@@ -145,7 +145,7 @@ static struct neighbour *ip6_neigh_lookup(const struct dst_entry *dst,
        struct neighbour *n;
 
        daddr = choose_neigh_daddr(rt, skb, daddr);
-       n = __ipv6_neigh_lookup(&nd_tbl, dst->dev, daddr);
+       n = __ipv6_neigh_lookup(dst->dev, daddr);
        if (n)
                return n;
        return neigh_create(&nd_tbl, daddr, dst->dev);
@@ -153,7 +153,7 @@ static struct neighbour *ip6_neigh_lookup(const struct dst_entry *dst,
 
 static int rt6_bind_neighbour(struct rt6_info *rt, struct net_device *dev)
 {
-       struct neighbour *n = __ipv6_neigh_lookup(&nd_tbl, dev, &rt->rt6i_gateway);
+       struct neighbour *n = __ipv6_neigh_lookup(dev, &rt->rt6i_gateway);
        if (!n) {
                n = neigh_create(&nd_tbl, &rt->rt6i_gateway, dev);
                if (IS_ERR(n))
@@ -499,22 +499,26 @@ static void rt6_probe(struct rt6_info *rt)
         * to no more than one per minute.
         */
        neigh = rt ? rt->n : NULL;
-       if (!neigh || (neigh->nud_state & NUD_VALID))
+       if (!neigh)
+               return;
+       write_lock_bh(&neigh->lock);
+       if (neigh->nud_state & NUD_VALID) {
+               write_unlock_bh(&neigh->lock);
                return;
-       read_lock_bh(&neigh->lock);
+       }
        if (!(neigh->nud_state & NUD_VALID) &&
            time_after(jiffies, neigh->updated + rt->rt6i_idev->cnf.rtr_probe_interval)) {
                struct in6_addr mcaddr;
                struct in6_addr *target;
 
                neigh->updated = jiffies;
-               read_unlock_bh(&neigh->lock);
+               write_unlock_bh(&neigh->lock);
 
                target = (struct in6_addr *)&neigh->primary_key;
                addrconf_addr_solict_mult(target, &mcaddr);
                ndisc_send_ns(rt->dst.dev, NULL, target, &mcaddr, NULL);
        } else {
-               read_unlock_bh(&neigh->lock);
+               write_unlock_bh(&neigh->lock);
        }
 }
 #else
This page took 0.02508 seconds and 5 git commands to generate.