]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/netconsole.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / drivers / net / netconsole.c
index 94255f09093d670695de61b00a07b818371844a0..dfb67eb2a94b726cb590f8b3a015d98a719866d1 100644 (file)
@@ -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,15 +691,16 @@ 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)
-               printk(KERN_INFO "netconsole: network logging stopped, "
-                       "interface %s %s\n",  dev->name,
+       if (stopped && (event == NETDEV_UNREGISTER || event == NETDEV_BONDING_DESLAVE))
+               printk(KERN_INFO "netconsole: network logging stopped on "
+                       "interface %s as it %s\n",  dev->name,
                        event == NETDEV_UNREGISTER ? "unregistered" : "released slaves");
 
 done: