bonding: set inactive flags on release
authorJiri Pirko <jiri@mellanox.com>
Thu, 3 Dec 2015 11:12:21 +0000 (12:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Dec 2015 16:49:27 +0000 (11:49 -0500)
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>
drivers/net/bonding/bond_main.c

index 2f1145063c60493901f2f22c7dadb8f6a9bfe092..5a7de43a09f8fb1e7d33e21db518812f1ce1baff 100644 (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 */