summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorClemens Noss <cnoss@gmx.de>2009-02-24 00:37:35 +0100
committerDavid S. Miller <davem@davemloft.net>2009-02-24 00:37:35 +0100
commitebe47d47b7b7fed72dabcce4717da727b4e2367d (patch)
treee871bc6f687e62a5c34d8f63a92fb6abf0462547 /net/core
parentnetns: fix double free at netns creation (diff)
downloadlinux-ebe47d47b7b7fed72dabcce4717da727b4e2367d.tar.xz
linux-ebe47d47b7b7fed72dabcce4717da727b4e2367d.zip
netns: build fix for net_alloc_generic
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>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/net_namespace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index b0767abf23e5..2adb1a7d361f 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -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;