aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2015-06-12 23:44:33 -0400
committerTheodore Ts'o <tytso@mit.edu>2015-06-12 23:44:33 -0400
commit1cb767cd4a79703105f4f3774c76896d621fdc54 (patch)
treea15852e8d6961417865bce77da77844b86039999 /fs/ext4/super.c
parent331573febb6a224bc50322e3670da326cb7f4cfc (diff)
ext4 crypto: fail the mount if blocksize != pagesize
We currently don't correctly handle the case where blocksize != pagesize, so disallow the mount in those cases. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 31e85bea9652..e13fe40d4a51 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4065,7 +4065,15 @@ no_journal:
4065 } 4065 }
4066 } 4066 }
4067 4067
4068 if (unlikely(sbi->s_mount_flags & EXT4_MF_TEST_DUMMY_ENCRYPTION) && 4068 if ((DUMMY_ENCRYPTION_ENABLED(sbi) ||
4069 EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_ENCRYPT)) &&
4070 (blocksize != PAGE_CACHE_SIZE)) {
4071 ext4_msg(sb, KERN_ERR,
4072 "Unsupported blocksize for fs encryption");
4073 goto failed_mount_wq;
4074 }
4075
4076 if (DUMMY_ENCRYPTION_ENABLED(sbi) &&
4069 !(sb->s_flags & MS_RDONLY) && 4077 !(sb->s_flags & MS_RDONLY) &&
4070 !EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_ENCRYPT)) { 4078 !EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_ENCRYPT)) {
4071 EXT4_SET_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_ENCRYPT); 4079 EXT4_SET_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_ENCRYPT);