]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.0/ext4-avoid-panic-during-forced-reboot-due-to-aborted-journal.patch
Linux 4.19.45
[thirdparty/kernel/stable-queue.git] / queue-5.0 / ext4-avoid-panic-during-forced-reboot-due-to-aborted-journal.patch
1 From 2c1d0e3631e5732dba98ef49ac0bec1388776793 Mon Sep 17 00:00:00 2001
2 From: Jan Kara <jack@suse.cz>
3 Date: Fri, 17 May 2019 17:37:18 -0400
4 Subject: ext4: avoid panic during forced reboot due to aborted journal
5
6 From: Jan Kara <jack@suse.cz>
7
8 commit 2c1d0e3631e5732dba98ef49ac0bec1388776793 upstream.
9
10 Handling of aborted journal is a special code path different from
11 standard ext4_error() one and it can call panic() as well. Commit
12 1dc1097ff60e ("ext4: avoid panic during forced reboot") forgot to update
13 this path so fix that omission.
14
15 Fixes: 1dc1097ff60e ("ext4: avoid panic during forced reboot")
16 Signed-off-by: Jan Kara <jack@suse.cz>
17 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
18 Cc: stable@kernel.org # 5.1
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 @@ -698,7 +698,7 @@ void __ext4_abort(struct super_block *sb
28 jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO);
29 save_error_info(sb, function, line);
30 }
31 - if (test_opt(sb, ERRORS_PANIC)) {
32 + if (test_opt(sb, ERRORS_PANIC) && !system_going_down()) {
33 if (EXT4_SB(sb)->s_journal &&
34 !(EXT4_SB(sb)->s_journal->j_flags & JBD2_REC_ERR))
35 return;