提交 8cc698f0 编写于 作者: D Debabrata Banerjee 提交者: Xie XiuQi

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: 1e381f60 ("ext4: do not allow journal_opts for fs w/o journal")
Signed-off-by: NDebabrata Banerjee <dbanerje@akamai.com>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
Reviewed-by: NJan Kara <jack@suse.cz>
Cc: stable@kernel.org
Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: Nyangerkun <yangerkun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 31761556
...@@ -4272,7 +4272,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) ...@@ -4272,7 +4272,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
"data=, fs mounted w/o journal"); "data=, fs mounted w/o journal");
goto failed_mount_wq; 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, JOURNAL_CHECKSUM);
clear_opt(sb, DATA_FLAGS); clear_opt(sb, DATA_FLAGS);
sbi->s_journal = NULL; sbi->s_journal = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册