synchronize_net();
- list_for_each_entry(dev, head, unreg_list)
+ list_for_each_entry(dev, head, unreg_list) {
dev_put(dev);
+ net_set_todo(dev);
+ }
}
static void rollback_registered(struct net_device *dev)
/* Expect explicit free_netdev() on failure */
dev->needs_free_netdev = false;
rollback_registered(dev);
- net_set_todo(dev);
goto out;
}
/*
list_move_tail(&dev->unreg_list, head);
} else {
rollback_registered(dev);
- /* Finish processing unregister after unlock */
- net_set_todo(dev);
}
}
EXPORT_SYMBOL(unregister_netdevice_queue);
*/
void unregister_netdevice_many(struct list_head *head)
{
- struct net_device *dev;
-
if (!list_empty(head)) {
rollback_registered_many(head);
- list_for_each_entry(dev, head, unreg_list)
- net_set_todo(dev);
list_del(head);
}
}