[Devel,RHEL7,COMMIT] Revert "fs: make overlayfs disabled in CT by default"

Submitted by Konstantin Khorenko on Sept. 13, 2016, 10:17 a.m.

Details

Message ID 201609131017.u8DAHg4B016380@finist_cl7.x64_64.work.ct
State New
Headers show

Patch hide | download patch | download mbox

diff --git a/fs/filesystems.c b/fs/filesystems.c
index 670d228..beaba56 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -16,9 +16,6 @@ 
 #include <linux/slab.h>
 #include <asm/uaccess.h>
 
-/* Affects ability of CT users to mount fs marked as FS_EXPERIMENTAL */
-int sysctl_experimental_fs_enable;
-
 /*
  * Handling of filesystem drivers list.
  * Rules:
@@ -222,10 +219,7 @@  int __init get_filesystem_list(char *buf)
 
 static inline bool filesystem_permitted(const struct file_system_type *fs)
 {
-	return ve_is_super(get_exec_env()) ||
-		(fs->fs_flags & FS_VIRTUALIZED) ||
-		((fs->fs_flags & FS_EXPERIMENTAL) &&
-		 sysctl_experimental_fs_enable);
+	return ve_is_super(get_exec_env()) || (fs->fs_flags & FS_VIRTUALIZED);
 }
 
 #ifdef CONFIG_PROC_FS
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index 24ec90b..2935967 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -1131,7 +1131,7 @@  static struct file_system_type ovl_fs_type = {
 	.name		= "overlay",
 	.mount		= ovl_mount,
 	.kill_sb	= kill_anon_super,
-	.fs_flags       = FS_EXPERIMENTAL,
+	.fs_flags       = FS_VIRTUALIZED,
 };
 MODULE_ALIAS_FS("overlay");
 
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f1c3d5b..7203dba 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -59,8 +59,6 @@  extern struct inodes_stat_t inodes_stat;
 extern int leases_enable, lease_break_time;
 extern int sysctl_protected_symlinks;
 extern int sysctl_protected_hardlinks;
-extern int sysctl_experimental_fs_enable;
-
 
 struct buffer_head;
 typedef int (get_block_t)(struct inode *inode, sector_t iblock,
@@ -2110,8 +2108,6 @@  struct file_system_type {
 #define FS_USERNS_MOUNT		8	/* Can be mounted by userns root */
 #define FS_USERNS_DEV_MOUNT	16 /* A userns mount does not imply MNT_NODEV */
 #define FS_VIRTUALIZED		64	/* Can mount this fstype inside ve */
-#define FS_EXPERIMENTAL		128	/* Ability to mount this fstype inside ve
-					 * is governed by experimental_fs_enable */
 #define FS_HAS_RM_XQUOTA	256	/* KABI: fs has the rm_xquota quota op */
 #define FS_HAS_INVALIDATE_RANGE	512	/* FS has new ->invalidatepage with length arg */
 #define FS_RENAME_DOES_D_MOVE	32768	/* FS will handle d_move() during rename() internally. */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index e59dd3b..c8f7bc3 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1781,13 +1781,6 @@  static struct ctl_table fs_table[] = {
 		.proc_handler	= &pipe_proc_fn,
 		.extra1		= &pipe_min_size,
 	},
-	{
-		.procname	= "experimental_fs_enable",
-		.data		= &sysctl_experimental_fs_enable,
-		.maxlen		= sizeof(int),
-		.mode		= 0644,
-		.proc_handler	= proc_dointvec,
-	},
 	{ }
 };