]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/ext4-fix-ext4_show_options-for-file-systems-w-o-journal.patch
285c1a2b7cedcf2e4e41a329231659ce52d644a6
[thirdparty/kernel/stable-queue.git] / queue-4.19 / ext4-fix-ext4_show_options-for-file-systems-w-o-journal.patch
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
5
6 From: Debabrata Banerjee <dbanerje@akamai.com>
7
8 commit 50b29d8f033a7c88c5bc011abc2068b1691ab755 upstream.
9
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.
13
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>
18 Cc: stable@kernel.org
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21 ---
22 fs/ext4/super.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25 --- a/fs/ext4/super.c
26 +++ b/fs/ext4/super.c
27 @@ -4270,7 +4270,7 @@ static int ext4_fill_super(struct super_
28 "data=, fs mounted w/o journal");
29 goto failed_mount_wq;
30 }
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;