[PATCH 2/2] IB/ipoib: Clean up redundant netif_addr_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A single memory load does not need to be protected by any lock.
The same priv->flags are fetched 15 lines ago without locking anyways.

Signed-off-by: Daniel Vacek <neelx@xxxxxxxxxx>
---
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 8e4f2c8839be..f54e0d212630 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -572,13 +572,9 @@ void ipoib_mcast_join_task(struct work_struct *work)
 		return;
 	}
 	priv->local_lid = port_attr.lid;
-	netif_addr_lock_bh(dev);
 
-	if (!test_bit(IPOIB_FLAG_DEV_ADDR_SET, &priv->flags)) {
-		netif_addr_unlock_bh(dev);
+	if (!test_bit(IPOIB_FLAG_DEV_ADDR_SET, &priv->flags))
 		return;
-	}
-	netif_addr_unlock_bh(dev);
 
 	mutex_lock(&priv->mcast_mutex);
 	spin_lock_irq(&priv->lock);
-- 
2.43.0





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux