netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
To: j.vosburgh@gmail.com, vfalico@gmail.com, gospo@cumulusnetworks.com
Cc: netdev@vger.kernel.org
Subject: [net-next] bond: output message before setting slave to inactive
Date: Tue, 29 Mar 2016 06:32:57 +0000	[thread overview]
Message-ID: <1459233177-6394-1-git-send-email-zhangshengju@cmss.chinamobile.com> (raw)

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

Signed-off-by: Zhang Shengju <zhangshengju@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	other threads:[~2016-03-29  6:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29  6:32 Zhang Shengju [this message]
2016-03-30 19:37 ` [net-next] bond: output message before setting slave to inactive David Miller
  -- strict thread matches above, loose matches on Subject: below --
2016-03-31  1:23 张胜举

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459233177-6394-1-git-send-email-zhangshengju@cmss.chinamobile.com \
    --to=zhangshengju@cmss.chinamobile.com \
    --cc=gospo@cumulusnetworks.com \
    --cc=j.vosburgh@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vfalico@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).