cxgb4i : remove spurious use of rcu
As pointed out by the intel guys, there is no need to hold rcu read lock in
cxgbi_inet6addr_handler(), this patch removes it.
Fixes: 759a0cc5a3
("cxgb4i: Add ipv6 code to driver, call into libcxgbi ipv6 api")
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
bae2e81a69
commit
e6b92c25d2
@@ -1646,25 +1646,22 @@ static int cxgbi_inet6addr_handler(struct notifier_block *this,
|
|||||||
struct cxgbi_device *cdev;
|
struct cxgbi_device *cdev;
|
||||||
int ret = NOTIFY_DONE;
|
int ret = NOTIFY_DONE;
|
||||||
|
|
||||||
rcu_read_lock();
|
|
||||||
|
|
||||||
if (event_dev->priv_flags & IFF_802_1Q_VLAN)
|
if (event_dev->priv_flags & IFF_802_1Q_VLAN)
|
||||||
event_dev = vlan_dev_real_dev(event_dev);
|
event_dev = vlan_dev_real_dev(event_dev);
|
||||||
|
|
||||||
cdev = cxgbi_device_find_by_netdev(event_dev, NULL);
|
cdev = cxgbi_device_find_by_netdev(event_dev, NULL);
|
||||||
if (!cdev) {
|
|
||||||
rcu_read_unlock();
|
if (!cdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case NETDEV_UP:
|
case NETDEV_UP:
|
||||||
ret = cxgb4_clip_get(event_dev,
|
ret = cxgb4_clip_get(event_dev,
|
||||||
(const struct in6_addr *)
|
(const struct in6_addr *)
|
||||||
((ifa)->addr.s6_addr));
|
((ifa)->addr.s6_addr));
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
rcu_read_unlock();
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
ret = NOTIFY_OK;
|
ret = NOTIFY_OK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1679,7 +1676,6 @@ static int cxgbi_inet6addr_handler(struct notifier_block *this,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
rcu_read_unlock();
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user