Skip to content

Commit e6b92c2

Browse files
anishdavem330
authored andcommitted
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: 759a0cc ("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>
1 parent bae2e81 commit e6b92c2

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

‎drivers/scsi/cxgbi/cxgb4i/cxgb4i.c‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,25 +1646,22 @@ static int cxgbi_inet6addr_handler(struct notifier_block *this,
16461646
struct cxgbi_device *cdev;
16471647
int ret = NOTIFY_DONE;
16481648

1649-
rcu_read_lock();
1650-
16511649
if (event_dev->priv_flags & IFF_802_1Q_VLAN)
16521650
event_dev = vlan_dev_real_dev(event_dev);
16531651

16541652
cdev = cxgbi_device_find_by_netdev(event_dev, NULL);
1655-
if (!cdev) {
1656-
rcu_read_unlock();
1653+
1654+
if (!cdev)
16571655
return ret;
1658-
}
1656+
16591657
switch (event) {
16601658
case NETDEV_UP:
16611659
ret = cxgb4_clip_get(event_dev,
16621660
(const struct in6_addr *)
16631661
((ifa)->addr.s6_addr));
1664-
if (ret < 0) {
1665-
rcu_read_unlock();
1662+
if (ret < 0)
16661663
return ret;
1667-
}
1664+
16681665
ret = NOTIFY_OK;
16691666
break;
16701667

@@ -1679,7 +1676,6 @@ static int cxgbi_inet6addr_handler(struct notifier_block *this,
16791676
break;
16801677
}
16811678

1682-
rcu_read_unlock();
16831679
return ret;
16841680
}
16851681

0 commit comments

Comments
 (0)