diff options
author | Serge E. Hallyn <serue@us.ibm.com> | 2006-10-02 05:18:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:20 -0400 |
commit | 1651e14e28a2d9f446018ef522882e0709a2ce4f (patch) | |
tree | 401ff78624fdc4b445f3f95174a223acaf6a4ca0 /fs/proc/base.c | |
parent | 0437eb594e6e5e699248f865482e61034be846d0 (diff) |
[PATCH] namespaces: incorporate fs namespace into nsproxy
This moves the mount namespace into the nsproxy. The mount namespace count
now refers to the number of nsproxies point to it, rather than the number of
tasks. As a result, the unshare_namespace() function in kernel/fork.c no
longer checks whether it is being shared.
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Andrey Savochkin <saw@sw.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 9c6a809f92b6..6d00ccc48c1c 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -71,6 +71,7 @@ | |||
71 | #include <linux/cpuset.h> | 71 | #include <linux/cpuset.h> |
72 | #include <linux/audit.h> | 72 | #include <linux/audit.h> |
73 | #include <linux/poll.h> | 73 | #include <linux/poll.h> |
74 | #include <linux/nsproxy.h> | ||
74 | #include "internal.h" | 75 | #include "internal.h" |
75 | 76 | ||
76 | /* NOTE: | 77 | /* NOTE: |
@@ -473,7 +474,7 @@ static int mounts_open(struct inode *inode, struct file *file) | |||
473 | 474 | ||
474 | if (task) { | 475 | if (task) { |
475 | task_lock(task); | 476 | task_lock(task); |
476 | namespace = task->namespace; | 477 | namespace = task->nsproxy->namespace; |
477 | if (namespace) | 478 | if (namespace) |
478 | get_namespace(namespace); | 479 | get_namespace(namespace); |
479 | task_unlock(task); | 480 | task_unlock(task); |
@@ -544,7 +545,7 @@ static int mountstats_open(struct inode *inode, struct file *file) | |||
544 | 545 | ||
545 | if (task) { | 546 | if (task) { |
546 | task_lock(task); | 547 | task_lock(task); |
547 | namespace = task->namespace; | 548 | namespace = task->nsproxy->namespace; |
548 | if (namespace) | 549 | if (namespace) |
549 | get_namespace(namespace); | 550 | get_namespace(namespace); |
550 | task_unlock(task); | 551 | task_unlock(task); |