diff --git a/net/core/dev.c b/net/core/dev.c index d035234ce00fd8b17cc5d047d94eb2ec2c74137f..b54a4158e1db587290bc388e956749b09bb8f44f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -10261,9 +10261,6 @@ static struct net_device *netdev_wait_allrefs_any(struct list_head *list) struct net_device *dev; int wait = 0; - list_for_each_entry(dev, list, todo_list) - linkwatch_forget_dev(dev); - rebroadcast_time = warning_time = jiffies; list_for_each_entry(dev, list, todo_list) @@ -10380,6 +10377,7 @@ void netdev_run_todo(void) } dev->reg_state = NETREG_UNREGISTERED; + linkwatch_forget_dev(dev); } while (!list_empty(&list)) {