This patch moves output message before setting slave to inactive, this will
print the correct status of slave device.

Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com>
---
 drivers/net/bonding/bond_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 941ec99..97fad05 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1830,6 +1830,10 @@ static int __bond_release_one(struct net_device 
*bond_dev,
                return -EINVAL;
        }
 
+       netdev_info(bond_dev, "Releasing %s interface %s\n",
+                   bond_is_active_slave(slave) ? "active" : "backup",
+                   slave_dev->name);
+
        bond_set_slave_inactive_flags(slave, BOND_SLAVE_NOTIFY_NOW);
 
        bond_sysfs_slave_del(slave);
@@ -1849,10 +1853,6 @@ static int __bond_release_one(struct net_device 
*bond_dev,
        if (bond_mode_uses_xmit_hash(bond))
                bond_update_slave_arr(bond, slave);
 
-       netdev_info(bond_dev, "Releasing %s interface %s\n",
-                   bond_is_active_slave(slave) ? "active" : "backup",
-                   slave_dev->name);
-
        oldcurrent = rcu_access_pointer(bond->curr_active_slave);
 
        RCU_INIT_POINTER(bond->current_arp_slave, NULL);
-- 
1.8.3.1



Reply via email to