diff options
author | Ferenc Wagner <wferi@niif.hu> | 2011-01-06 06:11:19 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-06 20:30:22 +0100 |
commit | 141dfba342b672588799432d74a3b6be88b5d713 (patch) | |
tree | 84fa2d4340133a9caf350cf38344fe9569671998 /drivers/net/netconsole.c | |
parent | cnic: Fix the type field in SPQ messages (diff) | |
download | linux-141dfba342b672588799432d74a3b6be88b5d713.tar.xz linux-141dfba342b672588799432d74a3b6be88b5d713.zip |
netconsole: don't announce stopping if nothing happened
Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/netconsole.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 94255f09093d..b2ad998040fa 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -664,6 +664,7 @@ static int netconsole_netdev_event(struct notifier_block *this, unsigned long flags; struct netconsole_target *nt; struct net_device *dev = ptr; + bool stopped = false; if (!(event == NETDEV_CHANGENAME || event == NETDEV_UNREGISTER || event == NETDEV_BONDING_DESLAVE || event == NETDEV_GOING_DOWN)) @@ -690,13 +691,14 @@ static int netconsole_netdev_event(struct notifier_block *this, case NETDEV_GOING_DOWN: case NETDEV_BONDING_DESLAVE: nt->enabled = 0; + stopped = true; break; } } netconsole_target_put(nt); } spin_unlock_irqrestore(&target_list_lock, flags); - if (event == NETDEV_UNREGISTER || event == NETDEV_BONDING_DESLAVE) + if (stopped && (event == NETDEV_UNREGISTER || event == NETDEV_BONDING_DESLAVE)) printk(KERN_INFO "netconsole: network logging stopped, " "interface %s %s\n", dev->name, event == NETDEV_UNREGISTER ? "unregistered" : "released slaves"); |