aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJay Vosburgh <fubar@us.ibm.com>2008-01-17 19:25:00 -0500
committerJeff Garzik <jeff@garzik.org>2008-01-18 14:38:38 -0500
commit3b96c858fcb27120fcba222366180c3293393ccf (patch)
tree53309f366e2a66be42591dfd1ecc9ac34ed96202 /drivers
parent2543331d367c9fe54f4ba73300894bc21e0a08f4 (diff)
bonding: release slaves when master removed via sysfs
Add a call to bond_release_all in the bonding netdev event handler for the master. This releases the slaves for the case of, e.g., "echo -bond0 > /sys/class/net/bonding_masters", which otherwise will spin forever waiting for references to be released. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bonding/bond_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 77d004d3c554..3ede0a2e6860 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3401,9 +3401,7 @@ static int bond_master_netdev_event(unsigned long event, struct net_device *bond
3401 case NETDEV_CHANGENAME: 3401 case NETDEV_CHANGENAME:
3402 return bond_event_changename(event_bond); 3402 return bond_event_changename(event_bond);
3403 case NETDEV_UNREGISTER: 3403 case NETDEV_UNREGISTER:
3404 /* 3404 bond_release_all(event_bond->dev);
3405 * TODO: remove a bond from the list?
3406 */
3407 break; 3405 break;
3408 default: 3406 default:
3409 break; 3407 break;