Skip to content

Commit d1f84c6

Browse files
stephen hemmingerdavem330
authored andcommitted
ipv6: additional ref count for hash list unnecessary
Since an address in hash list has to already have a ref count, no additional ref count is needed. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 27bdb2a commit d1f84c6

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

net/ipv6/addrconf.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,6 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen,
676676
hash = ipv6_addr_hash(addr);
677677

678678
hlist_add_head_rcu(&ifa->addr_lst, &inet6_addr_lst[hash]);
679-
in6_ifa_hold(ifa);
680679
spin_unlock(&addrconf_hash_lock);
681680

682681
write_lock(&idev->lock);
@@ -724,7 +723,6 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
724723

725724
spin_lock_bh(&addrconf_hash_lock);
726725
hlist_del_init_rcu(&ifp->addr_lst);
727-
__in6_ifa_put(ifp);
728726
spin_unlock_bh(&addrconf_hash_lock);
729727

730728
write_lock_bh(&idev->lock);
@@ -2713,7 +2711,6 @@ static int addrconf_ifdown(struct net_device *dev, int how)
27132711
/* clear hash table */
27142712
spin_lock_bh(&addrconf_hash_lock);
27152713
hlist_del_init_rcu(&ifa->addr_lst);
2716-
__in6_ifa_put(ifa);
27172714
spin_unlock_bh(&addrconf_hash_lock);
27182715
}
27192716

0 commit comments

Comments
 (0)