From: Jay Vosburgh Date: Fri, 18 Jan 2008 00:25:00 +0000 (-0800) Subject: bonding: release slaves when master removed via sysfs X-Git-Tag: v2.6.24~41^2~20 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3b96c858fcb27120fcba222366180c3293393ccf;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 77d004d3c55..3ede0a2e686 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 case NETDEV_CHANGENAME: return bond_event_changename(event_bond); case NETDEV_UNREGISTER: - /* - * TODO: remove a bond from the list? - */ + bond_release_all(event_bond->dev); break; default: break;