1 ext4: fix ext4_show_options for file systems w/o journal
3 From: Debabrata Banerjee <dbanerje@akamai.com>
5 Instead of removing EXT4_MOUNT_JOURNAL_CHECKSUM from s_def_mount_opt as
6 I assume was intended, all other options were blown away leading to
7 _ext4_show_options() output being incorrect.
9 Fixes: 1e381f60dad9 ("ext4: do not allow journal_opts for fs w/o journal")
10 Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
11 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
12 Reviewed-by: Jan Kara <jack@suse.cz>
15 fs/ext4/super.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
18 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
19 index 6ed4eb81e674..5cdf1d88b5c3 100644
22 @@ -4238,7 +4238,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
23 "data=, fs mounted w/o journal");
26 - sbi->s_def_mount_opt &= EXT4_MOUNT_JOURNAL_CHECKSUM;
27 + sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM;
28 clear_opt(sb, JOURNAL_CHECKSUM);
29 clear_opt(sb, DATA_FLAGS);
30 sbi->s_journal = NULL;