net_namespace: trivial cleanup
authorxiao jin <jin.xiao@intel.com>
Fri, 25 Apr 2014 00:50:54 +0000 (08:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Apr 2014 16:50:23 +0000 (12:50 -0400)
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>
net/core/net_namespace.c

index 81d3a9a..05e949d 100644 (file)
@@ -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 */