Skip to content

Commit

Permalink
net_namespace: trivial cleanup
Browse files Browse the repository at this point in the history
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 <jin.xiao@intel.com>
Reviewed-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
xiao jin authored and David S. Miller committed Apr 26, 2014
1 parent 98a20b7 commit 1818ce4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/net_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static void cleanup_net(struct work_struct *work)
{
const struct pernet_operations *ops;
struct net *net, *tmp;
LIST_HEAD(net_kill_list);
struct list_head net_kill_list;
LIST_HEAD(net_exit_list);

/* Atomically snapshot the list of namespaces to cleanup */
Expand Down

0 comments on commit 1818ce4

Please sign in to comment.