From: nikolay@redhat.com Date: Thu, 18 Apr 2013 07:33:35 +0000 (+0000) Subject: bonding: vlans don't get deleted on enslave failure X-Git-Tag: MMI-PSA29.97-13-9~14628^2~7^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a506e7b479e1215c230e4b87fedc246cf748537f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git bonding: vlans don't get deleted on enslave failure 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 4cecb80df854..dd67c49070d7 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1906,6 +1906,7 @@ err_detach: bond_mc_list_flush(bond_dev, slave_dev); netif_addr_unlock_bh(bond_dev); } + bond_del_vlans_from_slave(bond, slave_dev); write_lock_bh(&bond->lock); bond_detach_slave(bond, new_slave); write_unlock_bh(&bond->lock);