Commit d1f84c63 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

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: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 27bdb2ab
...@@ -676,7 +676,6 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen, ...@@ -676,7 +676,6 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen,
hash = ipv6_addr_hash(addr); hash = ipv6_addr_hash(addr);
hlist_add_head_rcu(&ifa->addr_lst, &inet6_addr_lst[hash]); hlist_add_head_rcu(&ifa->addr_lst, &inet6_addr_lst[hash]);
in6_ifa_hold(ifa);
spin_unlock(&addrconf_hash_lock); spin_unlock(&addrconf_hash_lock);
write_lock(&idev->lock); write_lock(&idev->lock);
...@@ -724,7 +723,6 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) ...@@ -724,7 +723,6 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
spin_lock_bh(&addrconf_hash_lock); spin_lock_bh(&addrconf_hash_lock);
hlist_del_init_rcu(&ifp->addr_lst); hlist_del_init_rcu(&ifp->addr_lst);
__in6_ifa_put(ifp);
spin_unlock_bh(&addrconf_hash_lock); spin_unlock_bh(&addrconf_hash_lock);
write_lock_bh(&idev->lock); write_lock_bh(&idev->lock);
...@@ -2713,7 +2711,6 @@ static int addrconf_ifdown(struct net_device *dev, int how) ...@@ -2713,7 +2711,6 @@ static int addrconf_ifdown(struct net_device *dev, int how)
/* clear hash table */ /* clear hash table */
spin_lock_bh(&addrconf_hash_lock); spin_lock_bh(&addrconf_hash_lock);
hlist_del_init_rcu(&ifa->addr_lst); hlist_del_init_rcu(&ifa->addr_lst);
__in6_ifa_put(ifa);
spin_unlock_bh(&addrconf_hash_lock); spin_unlock_bh(&addrconf_hash_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment