[patch net-next 17/26] bonding: set inactive flags on release

Jiri Pirko
2015-12-01T13:49:29Z

From: Jiri Pirko <jiri@mellanox.com>

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>
---
drivers/net/bonding/bond_main.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index e153a87..ec66f3e 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1830,6 +1830,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 */
--
1.9.3