Skip to content

Commit 64e3ed0

Browse files
ebiggersJaegeuk Kim
authored andcommitted
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>
1 parent 7bc155f commit 64e3ed0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

fs/f2fs/super.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,11 @@ static int f2fs_set_test_dummy_encryption(struct super_block *sb,
525525
return -EINVAL;
526526
}
527527
f2fs_warn(sbi, "Test dummy encryption mode enabled");
528+
return 0;
528529
#else
529-
f2fs_warn(sbi, "Test dummy encryption mount option ignored");
530+
f2fs_warn(sbi, "test_dummy_encryption option not supported");
531+
return -EINVAL;
530532
#endif
531-
return 0;
532533
}
533534

534535
#ifdef CONFIG_F2FS_FS_COMPRESSION

0 commit comments

Comments
 (0)