ipv4: remove useless codes in ipmr_device_event()
Subsystems (3)
PATCH 1/1 ipv4: remove useless codes in ipmr_device_event()
From: RongQing.Li <[email protected]>
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 <[email protected]>
--- net/ipv4/ipmr.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
net/ipv4/ipmr.c +1 -3
@@ -1520,7 +1520,6 @@ static int ipmr_device_event(struct notifier_block *this, unsigned long event, vstruct 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 ; }
Signature · 1 line
1.7.1
David Miller
maintainerFrom: [email protected]
Date: Thu, 24 Nov 2011 17:10:52 +0800
Quoted 9 lines
From: RongQing.Li <[email protected]>
Commit
7dc00c82added a 'notify' parameter forvif_delete()to distinguish whether to unregister the device.When notify=1 means we does not need to unregister the device, so calling
unregister_netdevice_manyis useless.Signed-off-by RongQing.Li <[email protected]>
I'll apply this, thanks.