add patch export-sysfs-casefold-feature-attribute
[ext4-patch-queue.git] / fix-ext4_show_options-for-fs-wo-journal
blobe0f471bd18382d5e01218069c1f3f3c3319eabb2
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>
13 Cc: stable@kernel.org
14 ---
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
20 --- a/fs/ext4/super.c
21 +++ b/fs/ext4/super.c
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");
24                         goto failed_mount_wq;
25                 }
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;
31 -- 
32 2.21.0