diff options
-rw-r--r-- | drivers/net/bonding/bond_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 9e5a533a1622..bafe62f7c9b7 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3430,7 +3430,6 @@ static int bond_close(struct net_device *bond_dev) | |||
3430 | 3430 | ||
3431 | write_lock_bh(&bond->lock); | 3431 | write_lock_bh(&bond->lock); |
3432 | 3432 | ||
3433 | bond_mc_list_destroy(bond); | ||
3434 | 3433 | ||
3435 | /* signal timers not to re-arm */ | 3434 | /* signal timers not to re-arm */ |
3436 | bond->kill_timers = 1; | 3435 | bond->kill_timers = 1; |
@@ -3461,8 +3460,6 @@ static int bond_close(struct net_device *bond_dev) | |||
3461 | break; | 3460 | break; |
3462 | } | 3461 | } |
3463 | 3462 | ||
3464 | /* Release the bonded slaves */ | ||
3465 | bond_release_all(bond_dev); | ||
3466 | 3463 | ||
3467 | if ((bond->params.mode == BOND_MODE_TLB) || | 3464 | if ((bond->params.mode == BOND_MODE_TLB) || |
3468 | (bond->params.mode == BOND_MODE_ALB)) { | 3465 | (bond->params.mode == BOND_MODE_ALB)) { |
@@ -4248,6 +4245,9 @@ static void bond_free_all(void) | |||
4248 | list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list) { | 4245 | list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list) { |
4249 | struct net_device *bond_dev = bond->dev; | 4246 | struct net_device *bond_dev = bond->dev; |
4250 | 4247 | ||
4248 | bond_mc_list_destroy(bond); | ||
4249 | /* Release the bonded slaves */ | ||
4250 | bond_release_all(bond_dev); | ||
4251 | unregister_netdevice(bond_dev); | 4251 | unregister_netdevice(bond_dev); |
4252 | bond_deinit(bond_dev); | 4252 | bond_deinit(bond_dev); |
4253 | } | 4253 | } |