netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net, bridge: print log message after state changed
@ 2011-11-10 16:18 Holger Brunck
  2011-11-14  5:37 ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Holger Brunck @ 2011-11-10 16:18 UTC (permalink / raw)
  To: netdev
  Cc: Wolfgang Fritz, Holger Brunck, Stephen Hemminger, David S. Miller,
	bridge

From: Wolfgang Fritz <wolfgang.fritz@keymile.com>

Function br_log_state writes log message "... entering XXXX state" so it
should be called after the state has changed and not before.

Signed-off-by: Wolfgang Fritz <wolfgang.fritz@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Stephen Hemminger <shemminger@linux-foundation.org>
cc: "David S. Miller" <davem@davemloft.net>
cc: bridge@lists.linux-foundation.org
---
 net/bridge/br_stp_if.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index 19308e3..e91be40 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -98,8 +98,6 @@ void br_stp_disable_port(struct net_bridge_port *p)
 	struct net_bridge *br = p->br;
 	int wasroot;
 
-	br_log_state(p);
-
 	wasroot = br_is_root_bridge(br);
 	br_become_designated_port(p);
 	p->state = BR_STATE_DISABLED;
@@ -121,6 +119,8 @@ void br_stp_disable_port(struct net_bridge_port *p)
 
 	if (br_is_root_bridge(br) && !wasroot)
 		br_become_root_bridge(br);
+
+	br_log_state(p);
 }
 
 static void br_stp_start(struct net_bridge *br)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-11-18  9:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10 16:18 [PATCH] net, bridge: print log message after state changed Holger Brunck
2011-11-14  5:37 ` David Miller
2011-11-14  7:03   ` Fritz, Wolfgang
2011-11-14  7:07     ` David Miller
2011-11-14  9:10       ` Fritz, Wolfgang
2011-11-14 14:27       ` Joe Perches
2011-11-17 19:23       ` David Lamparter
2011-11-17 22:40         ` Stephen Hemminger
2011-11-18  9:20         ` Holger Brunck

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).