mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
[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>
This commit is contained in:
parent
0437eb594e
commit
1651e14e28
9 changed files with 55 additions and 39 deletions
|
@ -4,6 +4,8 @@
|
|||
#include <linux/spinlock.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
struct namespace;
|
||||
|
||||
/*
|
||||
* A structure to contain pointers to all per-process
|
||||
* namespaces - fs (mount), uts, network, sysvipc, etc.
|
||||
|
@ -19,6 +21,7 @@
|
|||
struct nsproxy {
|
||||
atomic_t count;
|
||||
spinlock_t nslock;
|
||||
struct namespace *namespace;
|
||||
};
|
||||
extern struct nsproxy init_nsproxy;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue