Skip to content

Commit 1818ce4

Browse files
JinXiao-Inteldavem330
authored andcommitted
net_namespace: trivial cleanup
Do not initialize net_kill_list twice. list_replace_init() already takes care of initializing net_kill_list. We don't need to initialize it with LIST_HEAD() beforehand. Signed-off-by: xiao jin <[email protected]> Reviewed-by: David Cohen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 98a20b7 commit 1818ce4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/net_namespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ static void cleanup_net(struct work_struct *work)
273273
{
274274
const struct pernet_operations *ops;
275275
struct net *net, *tmp;
276-
LIST_HEAD(net_kill_list);
276+
struct list_head net_kill_list;
277277
LIST_HEAD(net_exit_list);
278278

279279
/* Atomically snapshot the list of namespaces to cleanup */

0 commit comments

Comments
 (0)