Skip to content

Commit

Permalink
netns: build fix for net_alloc_generic
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Clemens Noss authored and David S. Miller committed Feb 23, 2009
1 parent 486a87f commit ebe47d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/core/net_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ static __net_init int setup_net(struct net *net)
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;
Expand All @@ -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;
Expand Down

0 comments on commit ebe47d4

Please sign in to comment.