aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/inode.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2016-06-09 16:06:06 -0500
committerEric W. Biederman <ebiederm@xmission.com>2016-06-23 15:41:46 -0500
commit8654df4e2ac9704905198d63845554c2ddf6a93f (patch)
tree80c18b034fecf8e5754945f9e31ad2a807386907 /fs/proc/inode.c
parentmnt: Account for MS_RDONLY in fs_fully_visible (diff)
downloadlinux-dev-8654df4e2ac9704905198d63845554c2ddf6a93f.tar.xz
linux-dev-8654df4e2ac9704905198d63845554c2ddf6a93f.zip
mnt: Refactor fs_fully_visible into mount_too_revealing
Replace the call of fs_fully_visible in do_new_mount from before the new superblock is allocated with a call of mount_too_revealing after the superblock is allocated. This winds up being a much better location for maintainability of the code. The first change this enables is the replacement of FS_USERNS_VISIBLE with SB_I_USERNS_VISIBLE. Moving the flag from struct filesystem_type to sb_iflags on the superblock. Unfortunately mount_too_revealing fundamentally needs to touch mnt_flags adding several MNT_LOCKED_XXX flags at the appropriate times. If the mnt_flags did not need to be touched the code could be easily moved into the filesystem specific mount code. Acked-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/proc/inode.c')
-rw-r--r--fs/proc/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 42305ddcbaa0..78fa452d65ed 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -462,6 +462,7 @@ int proc_fill_super(struct super_block *s)
struct inode *root_inode;
int ret;
+ s->s_iflags |= SB_I_USERNS_VISIBLE;
s->s_flags |= MS_NODIRATIME | MS_NOSUID | MS_NOEXEC;
s->s_blocksize = 1024;
s->s_blocksize_bits = 10;