aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnish Bhatt <anish@chelsio.com>2014-08-02 18:50:44 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-02 23:34:33 -0400
commite6b92c25d20c64c271ef429bba8febeefb848b5b (patch)
treebf3d1ba8c46554c0d181538382176a545c9c2022
parentbae2e81a69c3f0e93707b36a5a655ca0e365a78d (diff)
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: 759a0cc5a3e1 ("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>
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/cxgb4i.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index a4a4e98effdd..d31f9e600639 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -1646,25 +1646,22 @@ static int cxgbi_inet6addr_handler(struct notifier_block *this,
1646 struct cxgbi_device *cdev; 1646 struct cxgbi_device *cdev;
1647 int ret = NOTIFY_DONE; 1647 int ret = NOTIFY_DONE;
1648 1648
1649 rcu_read_lock();
1650
1651 if (event_dev->priv_flags & IFF_802_1Q_VLAN) 1649 if (event_dev->priv_flags & IFF_802_1Q_VLAN)
1652 event_dev = vlan_dev_real_dev(event_dev); 1650 event_dev = vlan_dev_real_dev(event_dev);
1653 1651
1654 cdev = cxgbi_device_find_by_netdev(event_dev, NULL); 1652 cdev = cxgbi_device_find_by_netdev(event_dev, NULL);
1655 if (!cdev) { 1653
1656 rcu_read_unlock(); 1654 if (!cdev)
1657 return ret; 1655 return ret;
1658 } 1656
1659 switch (event) { 1657 switch (event) {
1660 case NETDEV_UP: 1658 case NETDEV_UP:
1661 ret = cxgb4_clip_get(event_dev, 1659 ret = cxgb4_clip_get(event_dev,
1662 (const struct in6_addr *) 1660 (const struct in6_addr *)
1663 ((ifa)->addr.s6_addr)); 1661 ((ifa)->addr.s6_addr));
1664 if (ret < 0) { 1662 if (ret < 0)
1665 rcu_read_unlock();
1666 return ret; 1663 return ret;
1667 } 1664
1668 ret = NOTIFY_OK; 1665 ret = NOTIFY_OK;
1669 break; 1666 break;
1670 1667
@@ -1679,7 +1676,6 @@ static int cxgbi_inet6addr_handler(struct notifier_block *this,
1679 break; 1676 break;
1680 } 1677 }
1681 1678
1682 rcu_read_unlock();
1683 return ret; 1679 return ret;
1684} 1680}
1685 1681