diff options
Diffstat (limited to 'net/ipv6/anycast.c')
| -rw-r--r-- | net/ipv6/anycast.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index 39ec528923f6..a9604764e015 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | #include <linux/capability.h> | 16 | #include <linux/capability.h> |
| 17 | #include <linux/config.h> | ||
| 18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| 19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
| 20 | #include <linux/types.h> | 19 | #include <linux/types.h> |
| @@ -57,7 +56,7 @@ ip6_onlink(struct in6_addr *addr, struct net_device *dev) | |||
| 57 | int onlink; | 56 | int onlink; |
| 58 | 57 | ||
| 59 | onlink = 0; | 58 | onlink = 0; |
| 60 | read_lock(&addrconf_lock); | 59 | rcu_read_lock(); |
| 61 | idev = __in6_dev_get(dev); | 60 | idev = __in6_dev_get(dev); |
| 62 | if (idev) { | 61 | if (idev) { |
| 63 | read_lock_bh(&idev->lock); | 62 | read_lock_bh(&idev->lock); |
| @@ -69,7 +68,7 @@ ip6_onlink(struct in6_addr *addr, struct net_device *dev) | |||
| 69 | } | 68 | } |
| 70 | read_unlock_bh(&idev->lock); | 69 | read_unlock_bh(&idev->lock); |
| 71 | } | 70 | } |
| 72 | read_unlock(&addrconf_lock); | 71 | rcu_read_unlock(); |
| 73 | return onlink; | 72 | return onlink; |
| 74 | } | 73 | } |
| 75 | 74 | ||
| @@ -336,7 +335,7 @@ int ipv6_dev_ac_inc(struct net_device *dev, struct in6_addr *addr) | |||
| 336 | write_unlock_bh(&idev->lock); | 335 | write_unlock_bh(&idev->lock); |
| 337 | 336 | ||
| 338 | dst_hold(&rt->u.dst); | 337 | dst_hold(&rt->u.dst); |
| 339 | if (ip6_ins_rt(rt, NULL, NULL, NULL)) | 338 | if (ip6_ins_rt(rt)) |
| 340 | dst_release(&rt->u.dst); | 339 | dst_release(&rt->u.dst); |
| 341 | 340 | ||
| 342 | addrconf_join_solict(dev, &aca->aca_addr); | 341 | addrconf_join_solict(dev, &aca->aca_addr); |
| @@ -379,7 +378,7 @@ int __ipv6_dev_ac_dec(struct inet6_dev *idev, struct in6_addr *addr) | |||
| 379 | addrconf_leave_solict(idev, &aca->aca_addr); | 378 | addrconf_leave_solict(idev, &aca->aca_addr); |
| 380 | 379 | ||
| 381 | dst_hold(&aca->aca_rt->u.dst); | 380 | dst_hold(&aca->aca_rt->u.dst); |
| 382 | if (ip6_del_rt(aca->aca_rt, NULL, NULL, NULL)) | 381 | if (ip6_del_rt(aca->aca_rt)) |
| 383 | dst_free(&aca->aca_rt->u.dst); | 382 | dst_free(&aca->aca_rt->u.dst); |
| 384 | else | 383 | else |
| 385 | dst_release(&aca->aca_rt->u.dst); | 384 | dst_release(&aca->aca_rt->u.dst); |
