diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-04-16 11:45:56 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-16 11:45:56 +0400 |
commit | 3a931a80cb25f905da377d1bb0ba9b1641aa579a (patch) | |
tree | b5ab114a1fb56af8728db3d21d7c463487d6214e /net | |
parent | fc54c65853dbfd2f70ff827b73344f9de4e4b501 (diff) | |
download | linux-3a931a80cb25f905da377d1bb0ba9b1641aa579a.tar.xz |
[RTNL]: Relax for_each_netdev_safe in __rtnl_link_unregister.
Each potential list_del (happening from inside a ->dellink call)
is followed by goto restart, so there's no need in _safe iteration.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/rtnetlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index da99ac0871bf..edc6dbfe48f2 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -277,12 +277,12 @@ EXPORT_SYMBOL_GPL(rtnl_link_register); */ void __rtnl_link_unregister(struct rtnl_link_ops *ops) { - struct net_device *dev, *n; + struct net_device *dev; struct net *net; for_each_net(net) { restart: - for_each_netdev_safe(net, dev, n) { + for_each_netdev(net, dev) { if (dev->rtnl_link_ops == ops) { ops->dellink(dev); goto restart; |