diff options
-rw-r--r-- | net/core/net_namespace.c | 20 |
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) | |||
266 | return peer; | 266 | return peer; |
267 | } | 267 | } |
268 | 268 | ||
269 | static struct ucounts *inc_net_namespaces(struct user_namespace *ns) | ||
270 | { | ||
271 | return inc_ucount(ns, current_euid(), UCOUNT_NET_NAMESPACES); | ||
272 | } | ||
273 | |||
274 | static void dec_net_namespaces(struct ucounts *ucounts) | ||
275 | { | ||
276 | dec_ucount(ucounts, UCOUNT_NET_NAMESPACES); | ||
277 | } | ||
278 | |||
279 | /* | 269 | /* |
280 | * setup_net runs the initializers for the network namespace object. | 270 | * setup_net runs the initializers for the network namespace object. |
281 | */ | 271 | */ |
@@ -320,6 +310,16 @@ out_undo: | |||
320 | 310 | ||
321 | 311 | ||
322 | #ifdef CONFIG_NET_NS | 312 | #ifdef CONFIG_NET_NS |
313 | static struct ucounts *inc_net_namespaces(struct user_namespace *ns) | ||
314 | { | ||
315 | return inc_ucount(ns, current_euid(), UCOUNT_NET_NAMESPACES); | ||
316 | } | ||
317 | |||
318 | static void dec_net_namespaces(struct ucounts *ucounts) | ||
319 | { | ||
320 | dec_ucount(ucounts, UCOUNT_NET_NAMESPACES); | ||
321 | } | ||
322 | |||
323 | static struct kmem_cache *net_cachep; | 323 | static struct kmem_cache *net_cachep; |
324 | static struct workqueue_struct *netns_wq; | 324 | static struct workqueue_struct *netns_wq; |
325 | 325 | ||