]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.4/ext4-fix-ext4_show_options-for-file-systems-w-o-journal.patch
4.4-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.4 / ext4-fix-ext4_show_options-for-file-systems-w-o-journal.patch
CommitLineData
5417ad6e
GKH
1From 50b29d8f033a7c88c5bc011abc2068b1691ab755 Mon Sep 17 00:00:00 2001
2From: Debabrata Banerjee <dbanerje@akamai.com>
3Date: Tue, 30 Apr 2019 23:08:15 -0400
4Subject: ext4: fix ext4_show_options for file systems w/o journal
5
6From: Debabrata Banerjee <dbanerje@akamai.com>
7
8commit 50b29d8f033a7c88c5bc011abc2068b1691ab755 upstream.
9
10Instead of removing EXT4_MOUNT_JOURNAL_CHECKSUM from s_def_mount_opt as
11I assume was intended, all other options were blown away leading to
12_ext4_show_options() output being incorrect.
13
14Fixes: 1e381f60dad9 ("ext4: do not allow journal_opts for fs w/o journal")
15Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
16Signed-off-by: Theodore Ts'o <tytso@mit.edu>
17Reviewed-by: Jan Kara <jack@suse.cz>
18Cc: stable@kernel.org
19Signed-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@@ -3867,7 +3867,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;