mnt: Refactor fs_fully_visible into mount_too_revealing
[cascardo/linux.git] / fs / sysfs / mount.c
index f3db820..f31e369 100644 (file)
@@ -42,7 +42,7 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type,
                kobj_ns_drop(KOBJ_NS_TYPE_NET, ns);
        else if (new_sb)
                /* Userspace would break if executables appear on sysfs */
-               root->d_sb->s_iflags |= SB_I_NOEXEC;
+               root->d_sb->s_iflags |= SB_I_USERNS_VISIBLE | SB_I_NOEXEC;
 
        return root;
 }
@@ -59,7 +59,7 @@ static struct file_system_type sysfs_fs_type = {
        .name           = "sysfs",
        .mount          = sysfs_mount,
        .kill_sb        = sysfs_kill_sb,
-       .fs_flags       = FS_USERNS_VISIBLE | FS_USERNS_MOUNT,
+       .fs_flags       = FS_USERNS_MOUNT,
 };
 
 int __init sysfs_init(void)