]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
netns: build fix for net_alloc_generic
authorClemens Noss <cnoss@gmx.de>
Mon, 23 Feb 2009 23:37:35 +0000 (15:37 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Feb 2009 23:37:35 +0000 (15:37 -0800)
net_alloc_generic was defined in #ifdef CONFIG_NET_NS, but used
unconditionally. Move net_alloc_generic out of #ifdef.

Signed-off-by: Clemens Noss <cnoss@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net_namespace.c

index b0767abf23e57f32e73d54ca2b44ebdeec1d5f11..2adb1a7d361f8391ebeeccf78cb7823527c2a1e7 100644 (file)
@@ -63,10 +63,6 @@ out_undo:
        goto out;
 }
 
-#ifdef CONFIG_NET_NS
-static struct kmem_cache *net_cachep;
-static struct workqueue_struct *netns_wq;
-
 static struct net_generic *net_alloc_generic(void)
 {
        struct net_generic *ng;
@@ -80,6 +76,10 @@ static struct net_generic *net_alloc_generic(void)
        return ng;
 }
 
+#ifdef CONFIG_NET_NS
+static struct kmem_cache *net_cachep;
+static struct workqueue_struct *netns_wq;
+
 static struct net *net_alloc(void)
 {
        struct net *net = NULL;