]> err.no Git - linux-2.6/commitdiff
[RTNL]: Relax for_each_netdev_safe in __rtnl_link_unregister.
authorPavel Emelyanov <xemul@openvz.org>
Wed, 16 Apr 2008 07:45:56 +0000 (00:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Apr 2008 07:45:56 +0000 (00:45 -0700)
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>
net/core/rtnetlink.c

index da99ac0871bfefe6f3384ce297f2187261907e1a..edc6dbfe48f28ae798e0382c6bf655aa8dd2fcc9 100644 (file)
@@ -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;