aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2011-12-02 11:52:08 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-05 15:20:19 -0500
commit2721745501a26d0dc3b88c0d2f3aa11471891388 (patch)
treee9c09622b11ad7d9317b4b01824374a852867c28 /net/ipv6/route.c
parent761965eab38d2cbc59c36e355c59609e3a04705a (diff)
net: Rename dst_get_neighbour{, _raw} to dst_get_neighbour_noref{, _raw}.
To reflect the fact that a refrence is not obtained to the resulting neighbour entry. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1138b0a5566d..09412baf1ca6 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -385,7 +385,7 @@ static void rt6_probe(struct rt6_info *rt)
385 * to no more than one per minute. 385 * to no more than one per minute.
386 */ 386 */
387 rcu_read_lock(); 387 rcu_read_lock();
388 neigh = rt ? dst_get_neighbour(&rt->dst) : NULL; 388 neigh = rt ? dst_get_neighbour_noref(&rt->dst) : NULL;
389 if (!neigh || (neigh->nud_state & NUD_VALID)) 389 if (!neigh || (neigh->nud_state & NUD_VALID))
390 goto out; 390 goto out;
391 read_lock_bh(&neigh->lock); 391 read_lock_bh(&neigh->lock);
@@ -432,7 +432,7 @@ static inline int rt6_check_neigh(struct rt6_info *rt)
432 int m; 432 int m;
433 433
434 rcu_read_lock(); 434 rcu_read_lock();
435 neigh = dst_get_neighbour(&rt->dst); 435 neigh = dst_get_neighbour_noref(&rt->dst);
436 if (rt->rt6i_flags & RTF_NONEXTHOP || 436 if (rt->rt6i_flags & RTF_NONEXTHOP ||
437 !(rt->rt6i_flags & RTF_GATEWAY)) 437 !(rt->rt6i_flags & RTF_GATEWAY))
438 m = 1; 438 m = 1;
@@ -786,7 +786,7 @@ static struct rt6_info *rt6_alloc_clone(struct rt6_info *ort,
786 786
787 if (rt) { 787 if (rt) {
788 rt->rt6i_flags |= RTF_CACHE; 788 rt->rt6i_flags |= RTF_CACHE;
789 dst_set_neighbour(&rt->dst, neigh_clone(dst_get_neighbour_raw(&ort->dst))); 789 dst_set_neighbour(&rt->dst, neigh_clone(dst_get_neighbour_noref_raw(&ort->dst)));
790 } 790 }
791 return rt; 791 return rt;
792} 792}
@@ -820,7 +820,7 @@ restart:
820 dst_hold(&rt->dst); 820 dst_hold(&rt->dst);
821 read_unlock_bh(&table->tb6_lock); 821 read_unlock_bh(&table->tb6_lock);
822 822
823 if (!dst_get_neighbour_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) 823 if (!dst_get_neighbour_noref_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP))
824 nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr); 824 nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr);
825 else if (!(rt->dst.flags & DST_HOST)) 825 else if (!(rt->dst.flags & DST_HOST))
826 nrt = rt6_alloc_clone(rt, &fl6->daddr); 826 nrt = rt6_alloc_clone(rt, &fl6->daddr);
@@ -1629,7 +1629,7 @@ void rt6_redirect(const struct in6_addr *dest, const struct in6_addr *src,
1629 dst_confirm(&rt->dst); 1629 dst_confirm(&rt->dst);
1630 1630
1631 /* Duplicate redirect: silently ignore. */ 1631 /* Duplicate redirect: silently ignore. */
1632 if (neigh == dst_get_neighbour_raw(&rt->dst)) 1632 if (neigh == dst_get_neighbour_noref_raw(&rt->dst))
1633 goto out; 1633 goto out;
1634 1634
1635 nrt = ip6_rt_copy(rt, dest); 1635 nrt = ip6_rt_copy(rt, dest);
@@ -1721,7 +1721,7 @@ again:
1721 1. It is connected route. Action: COW 1721 1. It is connected route. Action: COW
1722 2. It is gatewayed route or NONEXTHOP route. Action: clone it. 1722 2. It is gatewayed route or NONEXTHOP route. Action: clone it.
1723 */ 1723 */
1724 if (!dst_get_neighbour_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) 1724 if (!dst_get_neighbour_noref_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP))
1725 nrt = rt6_alloc_cow(rt, daddr, saddr); 1725 nrt = rt6_alloc_cow(rt, daddr, saddr);
1726 else 1726 else
1727 nrt = rt6_alloc_clone(rt, daddr); 1727 nrt = rt6_alloc_clone(rt, daddr);
@@ -2456,7 +2456,7 @@ static int rt6_fill_node(struct net *net,
2456 goto nla_put_failure; 2456 goto nla_put_failure;
2457 2457
2458 rcu_read_lock(); 2458 rcu_read_lock();
2459 n = dst_get_neighbour(&rt->dst); 2459 n = dst_get_neighbour_noref(&rt->dst);
2460 if (n) 2460 if (n)
2461 NLA_PUT(skb, RTA_GATEWAY, 16, &n->primary_key); 2461 NLA_PUT(skb, RTA_GATEWAY, 16, &n->primary_key);
2462 rcu_read_unlock(); 2462 rcu_read_unlock();
@@ -2653,7 +2653,7 @@ static int rt6_info_route(struct rt6_info *rt, void *p_arg)
2653 seq_puts(m, "00000000000000000000000000000000 00 "); 2653 seq_puts(m, "00000000000000000000000000000000 00 ");
2654#endif 2654#endif
2655 rcu_read_lock(); 2655 rcu_read_lock();
2656 n = dst_get_neighbour(&rt->dst); 2656 n = dst_get_neighbour_noref(&rt->dst);
2657 if (n) { 2657 if (n) {
2658 seq_printf(m, "%pi6", n->primary_key); 2658 seq_printf(m, "%pi6", n->primary_key);
2659 } else { 2659 } else {