netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cleanup_net: trivial cleanup
@ 2014-04-25  0:50 xiao jin
  2014-04-26 16:52 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: xiao jin @ 2014-04-25  0:50 UTC (permalink / raw)
  To: davem, trivial, ebiederm, dhowells, viro, serge.hallyn, netdev,
	linux-kernel
  Cc: david.a.cohen, xiao jin

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>
---
 net/core/net_namespace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 81d3a9a..05e949d 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -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 */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-26 16:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25  0:50 [PATCH] cleanup_net: trivial cleanup xiao jin
2014-04-26 16:52 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).