netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv4: remove useless codes in ipmr_device_event()
@ 2011-11-24  9:10 roy.qing.li
  2011-11-29 23:32 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: roy.qing.li @ 2011-11-24  9:10 UTC (permalink / raw)
  To: netdev

From: RongQing.Li <roy.qing.li@gmail.com>

Commit 7dc00c82 added a 'notify' parameter for vif_delete() to
distinguish whether to unregister the device.

When notify=1 means we does not need to unregister the device,
so calling unregister_netdevice_many is useless.

Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
---
 net/ipv4/ipmr.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 76a7f07..8e54490 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1520,7 +1520,6 @@ static int ipmr_device_event(struct notifier_block *this, unsigned long event, v
 	struct mr_table *mrt;
 	struct vif_device *v;
 	int ct;
-	LIST_HEAD(list);
 
 	if (event != NETDEV_UNREGISTER)
 		return NOTIFY_DONE;
@@ -1529,10 +1528,9 @@ static int ipmr_device_event(struct notifier_block *this, unsigned long event, v
 		v = &mrt->vif_table[0];
 		for (ct = 0; ct < mrt->maxvif; ct++, v++) {
 			if (v->dev == dev)
-				vif_delete(mrt, ct, 1, &list);
+				vif_delete(mrt, ct, 1, NULL);
 		}
 	}
-	unregister_netdevice_many(&list);
 	return NOTIFY_DONE;
 }
 
-- 
1.7.1

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

* Re: [PATCH] ipv4: remove useless codes in ipmr_device_event()
  2011-11-24  9:10 [PATCH] ipv4: remove useless codes in ipmr_device_event() roy.qing.li
@ 2011-11-29 23:32 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-11-29 23:32 UTC (permalink / raw)
  To: roy.qing.li; +Cc: netdev

From: roy.qing.li@gmail.com
Date: Thu, 24 Nov 2011 17:10:52 +0800

> From: RongQing.Li <roy.qing.li@gmail.com>
> 
> Commit 7dc00c82 added a 'notify' parameter for vif_delete() to
> distinguish whether to unregister the device.
> 
> When notify=1 means we does not need to unregister the device,
> so calling unregister_netdevice_many is useless.
> 
> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>

I'll apply this, thanks.

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

end of thread, other threads:[~2011-11-29 23:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24  9:10 [PATCH] ipv4: remove useless codes in ipmr_device_event() roy.qing.li
2011-11-29 23:32 ` David Miller

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