From 8cc698f0854aade4675a4c582b15139f1f5d94f6 Mon Sep 17 00:00:00 2001 From: Debabrata Banerjee Date: Wed, 22 May 2019 17:37:17 +0800 Subject: [PATCH] ext4: fix ext4_show_options for file systems w/o journal mainline inclusion from mainline-50b29d8f033a undefined commit 50b29d8f033a category: bugfix bugzilla: 14887 CVE: NA ------------------------------------------------- Instead of removing EXT4_MOUNT_JOURNAL_CHECKSUM from s_def_mount_opt as I assume was intended, all other options were blown away leading to _ext4_show_options() output being incorrect. Fixes: 1e381f60dad9 ("ext4: do not allow journal_opts for fs w/o journal") Signed-off-by: Debabrata Banerjee Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: stable@kernel.org Signed-off-by: zhangyi (F) Reviewed-by: yangerkun Signed-off-by: Yang Yingliang --- fs/ext4/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 918fc4c82f36..55c7aab8a4d6 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -4272,7 +4272,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) "data=, fs mounted w/o journal"); goto failed_mount_wq; } - sbi->s_def_mount_opt &= EXT4_MOUNT_JOURNAL_CHECKSUM; + sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM; clear_opt(sb, JOURNAL_CHECKSUM); clear_opt(sb, DATA_FLAGS); sbi->s_journal = NULL; -- GitLab