aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipmr.c
diff options
context:
space:
mode:
authorRongQing.Li <roy.qing.li@gmail.com>2011-11-23 18:10:52 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-29 18:32:33 -0500
commite92036a6516d07f61d4c214970a35ff05b919c25 (patch)
tree661be2f3cd9d894019c4607f7c46be77fbc9c847 /net/ipv4/ipmr.c
parent115d2a3de2fd7d501369b0091c5c485a72ed90ed (diff)
ipv4: remove useless codes in ipmr_device_event()
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r--net/ipv4/ipmr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 76a7f07b38b6..8e54490ee3f4 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
1520 struct mr_table *mrt; 1520 struct mr_table *mrt;
1521 struct vif_device *v; 1521 struct vif_device *v;
1522 int ct; 1522 int ct;
1523 LIST_HEAD(list);
1524 1523
1525 if (event != NETDEV_UNREGISTER) 1524 if (event != NETDEV_UNREGISTER)
1526 return NOTIFY_DONE; 1525 return NOTIFY_DONE;
@@ -1529,10 +1528,9 @@ static int ipmr_device_event(struct notifier_block *this, unsigned long event, v
1529 v = &mrt->vif_table[0]; 1528 v = &mrt->vif_table[0];
1530 for (ct = 0; ct < mrt->maxvif; ct++, v++) { 1529 for (ct = 0; ct < mrt->maxvif; ct++, v++) {
1531 if (v->dev == dev) 1530 if (v->dev == dev)
1532 vif_delete(mrt, ct, 1, &list); 1531 vif_delete(mrt, ct, 1, NULL);
1533 } 1532 }
1534 } 1533 }
1535 unregister_netdevice_many(&list);
1536 return NOTIFY_DONE; 1534 return NOTIFY_DONE;
1537} 1535}
1538 1536