Skip to contentSkip to conversation

bonding: remove unwanted bond lock for enslave processing

PATCH Applied Ding Tianhong 3 participants 3 messages Feb 10, 2014 – Feb 11, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding: remove unwanted bond lock for enslave processing

The bond enslave processing don't hold bond->lock anymore, so release an unlocked rw lock will cause warning message, remove the unwanted read_unlock(&bond->lock).

Cc Jay Vosburgh <[email protected]>
Cc Veaceslav Falico <[email protected]>
Cc Andy Gospodarek <[email protected]>
---
 drivers/net/bonding/bond_main.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/bonding/bond_main.c +0 -1
index a7db819..ccfb998 100644
@@ -1505,7 +1505,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
 	slave_dev->npinfo = bond->dev->npinfo;
 	if (slave_dev->npinfo) {
 		if (slave_enable_netpoll(new_slave)) {
-			read_unlock(&bond->lock);
 			pr_info("Error, %s: master_dev is using netpoll, "
 				 "but new slave device does not support netpoll.\n",
 				 bond_dev->name);
Signature · 1 line
1.8.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Ding Tianhong

The bond enslave processing don't hold bond->lock anymore, so release an unlocked rw lock will cause warning message, remove the unwanted read_unlock(&bond->lock).

Cc Jay Vosburgh <[email protected]>
Cc Veaceslav Falico <[email protected]>
Cc Andy Gospodarek <[email protected]>

Good catch.

Quoted 20 lines

---
drivers/net/bonding/bond_main.c | 1 -

1 file changed, 1 deletion(-)
drivers/net/bonding/bond_main.c +0 -1
index a7db819..ccfb998 100644
@@ -1505,7 +1505,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
 	slave_dev->npinfo = bond->dev->npinfo;
 	if (slave_dev->npinfo) {
 		if (slave_enable_netpoll(new_slave)) {
-			read_unlock(&bond->lock);
 			pr_info("Error, %s: master_dev is using netpoll, "
 				 "but new slave device does not support netpoll.\n",
 				 bond_dev->name);
Signature · 1 line
1.8.0
maintainer Applied
#2 lore raw
In reply to Ding Tianhong

From: Ding Tianhong <[email protected]>
Date: Mon, 10 Feb 2014 16:33:59 +0800

Quoted 8 lines

The bond enslave processing don't hold bond->lock anymore, so release an unlocked rw lock will cause warning message, remove the unwanted read_unlock(&bond->lock).

Cc Jay Vosburgh <[email protected]>
Cc Veaceslav Falico <[email protected]>
Cc Andy Gospodarek <[email protected]>

Applied, thanks.