Commit 911cb193 authored by Rob Landley's avatar Rob Landley Committed by David S. Miller

net: minor cleanup to net_namespace.c.

Inline a small static function that's only ever called from one place.
Signed-off-by: default avatarRob Landley <rlandley@parallels.com>
Reviewed-by: default avatarJiri Pirko <jpirko@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3968a85
...@@ -216,11 +216,14 @@ static void net_free(struct net *net) ...@@ -216,11 +216,14 @@ static void net_free(struct net *net)
kmem_cache_free(net_cachep, net); kmem_cache_free(net_cachep, net);
} }
static struct net *net_create(void) struct net *copy_net_ns(unsigned long flags, struct net *old_net)
{ {
struct net *net; struct net *net;
int rv; int rv;
if (!(flags & CLONE_NEWNET))
return get_net(old_net);
net = net_alloc(); net = net_alloc();
if (!net) if (!net)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
...@@ -239,13 +242,6 @@ static struct net *net_create(void) ...@@ -239,13 +242,6 @@ static struct net *net_create(void)
return net; return net;
} }
struct net *copy_net_ns(unsigned long flags, struct net *old_net)
{
if (!(flags & CLONE_NEWNET))
return get_net(old_net);
return net_create();
}
static DEFINE_SPINLOCK(cleanup_list_lock); static DEFINE_SPINLOCK(cleanup_list_lock);
static LIST_HEAD(cleanup_list); /* Must hold cleanup_list_lock to touch */ static LIST_HEAD(cleanup_list); /* Must hold cleanup_list_lock to touch */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment