]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ext4: fix ext4_show_options for file systems w/o journal
authorDebabrata Banerjee <dbanerje@akamai.com>
Wed, 1 May 2019 03:08:15 +0000 (23:08 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 1 May 2019 03:08:15 +0000 (23:08 -0400)
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: eb241d819532 ("ext4: do not allow journal_opts for fs w/o journal")
Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: stable@kernel.org
fs/ext4/super.c

index aeb6d22ea0ade330915af1661ff58af20f9e2474..fc6fa2c93e77c193939d095435a84fc188c53479 100644 (file)
@@ -4349,7 +4349,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;