diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 14:25:34 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 14:25:34 -0400 |
commit | e4b636366c00738b9609cda307014d71b1225b7f (patch) | |
tree | 760b67b3624eda62e943e48ce93635c30a5b47bf /drivers/net/netconsole.c | |
parent | b9ed7252d219c1c663944bf03846eabb515dbe75 (diff) | |
parent | 279e677faa775ad16e75c32e1bf4a37f8158bc61 (diff) |
Merge branch 'master' into for-2.6.31
Conflicts:
drivers/block/hd.c
drivers/block/mg_disk.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/net/netconsole.c')
-rw-r--r-- | drivers/net/netconsole.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index eceadf787a67..bf4af5248cb7 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -664,7 +664,7 @@ static int netconsole_netdev_event(struct notifier_block *this, | |||
664 | struct netconsole_target *nt; | 664 | struct netconsole_target *nt; |
665 | struct net_device *dev = ptr; | 665 | struct net_device *dev = ptr; |
666 | 666 | ||
667 | if (!(event == NETDEV_CHANGENAME)) | 667 | if (!(event == NETDEV_CHANGENAME || event == NETDEV_UNREGISTER)) |
668 | goto done; | 668 | goto done; |
669 | 669 | ||
670 | spin_lock_irqsave(&target_list_lock, flags); | 670 | spin_lock_irqsave(&target_list_lock, flags); |
@@ -675,6 +675,15 @@ static int netconsole_netdev_event(struct notifier_block *this, | |||
675 | case NETDEV_CHANGENAME: | 675 | case NETDEV_CHANGENAME: |
676 | strlcpy(nt->np.dev_name, dev->name, IFNAMSIZ); | 676 | strlcpy(nt->np.dev_name, dev->name, IFNAMSIZ); |
677 | break; | 677 | break; |
678 | case NETDEV_UNREGISTER: | ||
679 | if (!nt->enabled) | ||
680 | break; | ||
681 | netpoll_cleanup(&nt->np); | ||
682 | nt->enabled = 0; | ||
683 | printk(KERN_INFO "netconsole: network logging stopped" | ||
684 | ", interface %s unregistered\n", | ||
685 | dev->name); | ||
686 | break; | ||
678 | } | 687 | } |
679 | } | 688 | } |
680 | netconsole_target_put(nt); | 689 | netconsole_target_put(nt); |