summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-04-11 20:50:06 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-01 17:29:39 -0400
commit0bb80f240520c4148b623161e7856858c021696d (patch)
treeeeb27af589bc12d5864bd2594e5eea59aabe37db /kernel
parentc3bef7bcaaa7d9f6704fcd81a171c9f0c91a2259 (diff)
proc: Split the namespace stuff out into linux/proc_ns.h
Split the proc namespace stuff out into linux/proc_ns.h. Signed-off-by: David Howells <dhowells@redhat.com> cc: netdev@vger.kernel.org cc: Serge E. Hallyn <serge.hallyn@ubuntu.com> cc: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/nsproxy.c6
-rw-r--r--kernel/pid.c1
-rw-r--r--kernel/pid_namespace.c2
-rw-r--r--kernel/user.c2
-rw-r--r--kernel/user_namespace.c2
-rw-r--r--kernel/utsname.c2
6 files changed, 8 insertions, 7 deletions
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index afc0456f227a..364ceab15f0c 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -22,7 +22,7 @@
22#include <linux/pid_namespace.h> 22#include <linux/pid_namespace.h>
23#include <net/net_namespace.h> 23#include <net/net_namespace.h>
24#include <linux/ipc_namespace.h> 24#include <linux/ipc_namespace.h>
25#include <linux/proc_fs.h> 25#include <linux/proc_ns.h>
26#include <linux/file.h> 26#include <linux/file.h>
27#include <linux/syscalls.h> 27#include <linux/syscalls.h>
28 28
@@ -241,7 +241,7 @@ SYSCALL_DEFINE2(setns, int, fd, int, nstype)
241 const struct proc_ns_operations *ops; 241 const struct proc_ns_operations *ops;
242 struct task_struct *tsk = current; 242 struct task_struct *tsk = current;
243 struct nsproxy *new_nsproxy; 243 struct nsproxy *new_nsproxy;
244 struct proc_inode *ei; 244 struct proc_ns *ei;
245 struct file *file; 245 struct file *file;
246 int err; 246 int err;
247 247
@@ -250,7 +250,7 @@ SYSCALL_DEFINE2(setns, int, fd, int, nstype)
250 return PTR_ERR(file); 250 return PTR_ERR(file);
251 251
252 err = -EINVAL; 252 err = -EINVAL;
253 ei = PROC_I(file_inode(file)); 253 ei = get_proc_ns(file_inode(file));
254 ops = ei->ns_ops; 254 ops = ei->ns_ops;
255 if (nstype && (ops->type != nstype)) 255 if (nstype && (ops->type != nstype))
256 goto out; 256 goto out;
diff --git a/kernel/pid.c b/kernel/pid.c
index 047dc6264638..686255e2c39e 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -36,6 +36,7 @@
36#include <linux/pid_namespace.h> 36#include <linux/pid_namespace.h>
37#include <linux/init_task.h> 37#include <linux/init_task.h>
38#include <linux/syscalls.h> 38#include <linux/syscalls.h>
39#include <linux/proc_ns.h>
39#include <linux/proc_fs.h> 40#include <linux/proc_fs.h>
40 41
41#define pid_hashfn(nr, ns) \ 42#define pid_hashfn(nr, ns) \
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index c1c3dc1c6023..4af28a849065 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -15,7 +15,7 @@
15#include <linux/err.h> 15#include <linux/err.h>
16#include <linux/acct.h> 16#include <linux/acct.h>
17#include <linux/slab.h> 17#include <linux/slab.h>
18#include <linux/proc_fs.h> 18#include <linux/proc_ns.h>
19#include <linux/reboot.h> 19#include <linux/reboot.h>
20#include <linux/export.h> 20#include <linux/export.h>
21 21
diff --git a/kernel/user.c b/kernel/user.c
index e81978e8c03b..5bbb91988e69 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -16,7 +16,7 @@
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/export.h> 17#include <linux/export.h>
18#include <linux/user_namespace.h> 18#include <linux/user_namespace.h>
19#include <linux/proc_fs.h> 19#include <linux/proc_ns.h>
20 20
21/* 21/*
22 * userns count is 1 for root user, 1 for init_uts_ns, 22 * userns count is 1 for root user, 1 for init_uts_ns,
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index b14f4d342043..51855f5f6311 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -9,7 +9,7 @@
9#include <linux/nsproxy.h> 9#include <linux/nsproxy.h>
10#include <linux/slab.h> 10#include <linux/slab.h>
11#include <linux/user_namespace.h> 11#include <linux/user_namespace.h>
12#include <linux/proc_fs.h> 12#include <linux/proc_ns.h>
13#include <linux/highuid.h> 13#include <linux/highuid.h>
14#include <linux/cred.h> 14#include <linux/cred.h>
15#include <linux/securebits.h> 15#include <linux/securebits.h>
diff --git a/kernel/utsname.c b/kernel/utsname.c
index a47fc5de3113..2fc8576efaa8 100644
--- a/kernel/utsname.c
+++ b/kernel/utsname.c
@@ -15,7 +15,7 @@
15#include <linux/err.h> 15#include <linux/err.h>
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/user_namespace.h> 17#include <linux/user_namespace.h>
18#include <linux/proc_fs.h> 18#include <linux/proc_ns.h>
19 19
20static struct uts_namespace *create_uts_ns(void) 20static struct uts_namespace *create_uts_ns(void)
21{ 21{