summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/net_namespace.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index e8be581b47b0..5e0042693c65 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -266,16 +266,6 @@ struct net *get_net_ns_by_id(struct net *net, int id)
return peer;
}
-static struct ucounts *inc_net_namespaces(struct user_namespace *ns)
-{
- return inc_ucount(ns, current_euid(), UCOUNT_NET_NAMESPACES);
-}
-
-static void dec_net_namespaces(struct ucounts *ucounts)
-{
- dec_ucount(ucounts, UCOUNT_NET_NAMESPACES);
-}
-
/*
* setup_net runs the initializers for the network namespace object.
*/
@@ -320,6 +310,16 @@ out_undo:
#ifdef CONFIG_NET_NS
+static struct ucounts *inc_net_namespaces(struct user_namespace *ns)
+{
+ return inc_ucount(ns, current_euid(), UCOUNT_NET_NAMESPACES);
+}
+
+static void dec_net_namespaces(struct ucounts *ucounts)
+{
+ dec_ucount(ucounts, UCOUNT_NET_NAMESPACES);
+}
+
static struct kmem_cache *net_cachep;
static struct workqueue_struct *netns_wq;