bonding: set inactive flags on release

Be correct and symmetric to enslave and set inactive flags during release.
That gives LAG offload drivers - lower state change listeners - possibility
to do proper cleanup.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko 2015-12-03 12:12:21 +01:00 committed by David S. Miller
parent f7c7eb7f7a
commit 57beaca8ec
1 changed files with 2 additions and 0 deletions

View File

@ -1832,6 +1832,8 @@ static int __bond_release_one(struct net_device *bond_dev,
return -EINVAL;
}
bond_set_slave_inactive_flags(slave, BOND_SLAVE_NOTIFY_NOW);
bond_sysfs_slave_del(slave);
/* recompute stats just before removing the slave */