diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index ab39fe17cb5..195a5e96b2d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2980,7 +2980,7 @@ static void netdev_wait_allrefs(struct net_device *dev) | |||
2980 | static DEFINE_MUTEX(net_todo_run_mutex); | 2980 | static DEFINE_MUTEX(net_todo_run_mutex); |
2981 | void netdev_run_todo(void) | 2981 | void netdev_run_todo(void) |
2982 | { | 2982 | { |
2983 | struct list_head list = LIST_HEAD_INIT(list); | 2983 | struct list_head list; |
2984 | 2984 | ||
2985 | /* Need to guard against multiple cpu's getting out of order. */ | 2985 | /* Need to guard against multiple cpu's getting out of order. */ |
2986 | mutex_lock(&net_todo_run_mutex); | 2986 | mutex_lock(&net_todo_run_mutex); |
@@ -2995,9 +2995,9 @@ void netdev_run_todo(void) | |||
2995 | 2995 | ||
2996 | /* Snapshot list, allow later requests */ | 2996 | /* Snapshot list, allow later requests */ |
2997 | spin_lock(&net_todo_list_lock); | 2997 | spin_lock(&net_todo_list_lock); |
2998 | list_splice_init(&net_todo_list, &list); | 2998 | list_replace_init(&net_todo_list, &list); |
2999 | spin_unlock(&net_todo_list_lock); | 2999 | spin_unlock(&net_todo_list_lock); |
3000 | 3000 | ||
3001 | while (!list_empty(&list)) { | 3001 | while (!list_empty(&list)) { |
3002 | struct net_device *dev | 3002 | struct net_device *dev |
3003 | = list_entry(list.next, struct net_device, todo_list); | 3003 | = list_entry(list.next, struct net_device, todo_list); |