1 From 50b29d8f033a7c88c5bc011abc2068b1691ab755 Mon Sep 17 00:00:00 2001
2 From: Debabrata Banerjee <dbanerje@akamai.com>
3 Date: Tue, 30 Apr 2019 23:08:15 -0400
4 Subject: ext4: fix ext4_show_options for file systems w/o journal
6 From: Debabrata Banerjee <dbanerje@akamai.com>
8 commit 50b29d8f033a7c88c5bc011abc2068b1691ab755 upstream.
10 Instead of removing EXT4_MOUNT_JOURNAL_CHECKSUM from s_def_mount_opt as
11 I assume was intended, all other options were blown away leading to
12 _ext4_show_options() output being incorrect.
14 Fixes: 1e381f60dad9 ("ext4: do not allow journal_opts for fs w/o journal")
15 Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
16 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
17 Reviewed-by: Jan Kara <jack@suse.cz>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 fs/ext4/super.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
27 @@ -4270,7 +4270,7 @@ static int ext4_fill_super(struct super_
28 "data=, fs mounted w/o journal");
31 - sbi->s_def_mount_opt &= EXT4_MOUNT_JOURNAL_CHECKSUM;
32 + sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM;
33 clear_opt(sb, JOURNAL_CHECKSUM);
34 clear_opt(sb, DATA_FLAGS);
35 sbi->s_journal = NULL;