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 <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
nikolay@redhat.com 2013-04-18 07:33:35 +00:00 коммит произвёл David S. Miller
Родитель 25e40305d4
Коммит a506e7b479
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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);