[2/5] bonding: vlans don't get deleted on enslave failure

Message ID 1366295697-31037-3-git-send-email-nikolay@redhat.com
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Nikolay Aleksandrov April 18, 2013, 2:34 p.m.
The main problem is with vid refcount which only gets bumped up.
Delete the vlans after err_detach as that's the first error path
after the vlans are added.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
 drivers/net/bonding/bond_main.c | 1 +
 1 file changed, 1 insertion(+)


diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index dc0153b..bf5a9df 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1904,6 +1904,7 @@  err_detach:
 		bond_mc_list_flush(bond_dev, slave_dev);
+	bond_del_vlans_from_slave(bond, slave_dev);
 	bond_detach_slave(bond, new_slave);