aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/veth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r--drivers/net/veth.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index fdd1e034569d..3f67a29593bc 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -15,7 +15,7 @@
15 15
16#include <net/dst.h> 16#include <net/dst.h>
17#include <net/xfrm.h> 17#include <net/xfrm.h>
18#include <net/veth.h> 18#include <linux/veth.h>
19 19
20#define DRV_NAME "veth" 20#define DRV_NAME "veth"
21#define DRV_VERSION "1.0" 21#define DRV_VERSION "1.0"
@@ -459,19 +459,7 @@ static __init int veth_init(void)
459 459
460static __exit void veth_exit(void) 460static __exit void veth_exit(void)
461{ 461{
462 struct veth_priv *priv, *next; 462 rtnl_link_unregister(&veth_link_ops);
463
464 rtnl_lock();
465 /*
466 * cannot trust __rtnl_link_unregister() to unregister all
467 * devices, as each ->dellink call will remove two devices
468 * from the list at once.
469 */
470 list_for_each_entry_safe(priv, next, &veth_list, list)
471 veth_dellink(priv->dev);
472
473 __rtnl_link_unregister(&veth_link_ops);
474 rtnl_unlock();
475} 463}
476 464
477module_init(veth_init); 465module_init(veth_init);