]> err.no Git - linux-2.6/commitdiff
bonding: release slaves when master removed via sysfs
authorJay Vosburgh <fubar@us.ibm.com>
Fri, 18 Jan 2008 00:25:00 +0000 (16:25 -0800)
committerJeff Garzik <jeff@garzik.org>
Fri, 18 Jan 2008 19:38:38 +0000 (14:38 -0500)
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>
drivers/net/bonding/bond_main.c

index 77d004d3c554c20aed1bef3db08188ba6e0372b3..3ede0a2e686089dc94056e83e55bcf45f9d3b01e 100644 (file)
@@ -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;