Make proc hav emultiple superblocks - one for each namespace
PATCH 12/20 Make proc hav emultiple superblocks - one for each namespace
Each pid namespace have to be visible through its own proc mount. Thus we need to have per-namespace proc trees with their own superblocks.
Signed-off-by Pavel Emelyanov <[email protected]>
---
fs/proc/inode.c | 2 - fs/proc/root.c | 67 +++++++++++++++++++++++++++++++++++++++--- include/linux/pid_namespace.h | 3 + include/linux/proc_fs.h | 3 + 4 files changed, 69 insertions(+), 6 deletions(-)
fs/proc/inode.c renamed from fs/proc/inode.c.ve12 +1 -1
@@ -427,7 +428,7 @@ out_mod:return NULL ; } -int proc_fill_super (struct super_block *s,void *data,int silent) +int proc_fill_super (struct super_block *s) {struct inode * root_inode;
fs/proc/root.c renamed from fs/proc/root.c.ve12 +63 -4
107 lines not on this page · raw message
include/linux/pid_namespace.h renamed from include/linux/pid_namespace.h.ve12 +3 -0
@@ -23,6 +23,9 @@ struct pid_namespace {struct kmem_cache *pid_cachep;int level;struct pid_namespace *parent; +#ifdef CONFIG_PROC_FS +struct vfsmount *proc_mnt; +#endif };extern struct pid_namespace init_pid_ns;
include/linux/proc_fs.h renamed from include/linux/proc_fs.h.ve12 +2 -1
@@ -126,7 +126,8 @@ extern struct proc_dir_entry *create_proextern void remove_proc_entry (const char *name,struct proc_dir_entry *parent);extern struct vfsmount *proc_mnt; -extern int proc_fill_super (struct super_block *,void *,int ); +struct pid_namespace ; +extern int proc_fill_super (struct super_block *);extern struct inode *proc_get_inode (struct super_block *,unsigned int ,struct proc_dir_entry *);/*