]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/5.0.18/ext4-avoid-panic-during-forced-reboot-due-to-aborted-journal.patch
Linux 5.0.18
[thirdparty/kernel/stable-queue.git] / releases / 5.0.18 / ext4-avoid-panic-during-forced-reboot-due-to-aborted-journal.patch
CommitLineData
c11248ed
GKH
1From 2c1d0e3631e5732dba98ef49ac0bec1388776793 Mon Sep 17 00:00:00 2001
2From: Jan Kara <jack@suse.cz>
3Date: Fri, 17 May 2019 17:37:18 -0400
4Subject: ext4: avoid panic during forced reboot due to aborted journal
5
6From: Jan Kara <jack@suse.cz>
7
8commit 2c1d0e3631e5732dba98ef49ac0bec1388776793 upstream.
9
10Handling of aborted journal is a special code path different from
11standard ext4_error() one and it can call panic() as well. Commit
121dc1097ff60e ("ext4: avoid panic during forced reboot") forgot to update
13this path so fix that omission.
14
15Fixes: 1dc1097ff60e ("ext4: avoid panic during forced reboot")
16Signed-off-by: Jan Kara <jack@suse.cz>
17Signed-off-by: Theodore Ts'o <tytso@mit.edu>
18Cc: stable@kernel.org # 5.1
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@@ -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;