summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2022-04-30 22:08:52 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2022-05-12 10:14:03 -0700
commit64e3ed0b8ea019597d0b5448fdf05a29eb65ae95 (patch)
tree49f218772a3829c37ecbd05fd26b8e5b081b349d /fs
parent7bc155fec5b371dbb57256e84a49c78692a09060 (diff)
downloadlinux-rpi-64e3ed0b8ea019597d0b5448fdf05a29eb65ae95.tar.gz
linux-rpi-64e3ed0b8ea019597d0b5448fdf05a29eb65ae95.tar.bz2
linux-rpi-64e3ed0b8ea019597d0b5448fdf05a29eb65ae95.zip
f2fs: reject test_dummy_encryption when !CONFIG_FS_ENCRYPTION
There is no good reason to allow this mount option when the kernel isn't configured with encryption support. Since this option is only for testing, we can just fix this; we don't really need to worry about breaking anyone who might be counting on this option being ignored. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/super.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 0900c552a16c..8c81dd324297 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -525,10 +525,11 @@ static int f2fs_set_test_dummy_encryption(struct super_block *sb,
return -EINVAL;
}
f2fs_warn(sbi, "Test dummy encryption mode enabled");
+ return 0;
#else
- f2fs_warn(sbi, "Test dummy encryption mount option ignored");
+ f2fs_warn(sbi, "test_dummy_encryption option not supported");
+ return -EINVAL;
#endif
- return 0;
}
#ifdef CONFIG_F2FS_FS_COMPRESSION