From 1651e14e28a2d9f446018ef522882e0709a2ce4f Mon Sep 17 00:00:00 2001 From: "Serge E. Hallyn" Date: Mon, 2 Oct 2006 02:18:08 -0700 Subject: [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 Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/nsproxy.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/nsproxy.h') diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index 7bdebfaab6a..7ebe66670c5 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h @@ -4,6 +4,8 @@ #include #include +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; -- cgit v1.2.3