linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: Avoid panic during forced reboot due to aborted journal
@ 2019-05-15 10:46 Jan Kara
  2019-05-17 21:50 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2019-05-15 10:46 UTC (permalink / raw)
  To: Ted Tso; +Cc: linux-ext4, Jan Kara

Handling of aborted journal is a special code path different from
standard ext4_error() one and it can call panic() as well. Commit
1dc1097ff60e ("ext4: avoid panic during forced reboot") forgot to update
this path so fix that omission.

Fixes: 1dc1097ff60e ("ext4: avoid panic during forced reboot")
Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index f71b5254a990..f48955bbf9d7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -699,7 +699,7 @@ void __ext4_abort(struct super_block *sb, const char *function,
 			jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO);
 		save_error_info(sb, function, line);
 	}
-	if (test_opt(sb, ERRORS_PANIC)) {
+	if (test_opt(sb, ERRORS_PANIC) && !system_going_down()) {
 		if (EXT4_SB(sb)->s_journal &&
 		  !(EXT4_SB(sb)->s_journal->j_flags & JBD2_REC_ERR))
 			return;
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ext4: Avoid panic during forced reboot due to aborted journal
  2019-05-15 10:46 [PATCH] ext4: Avoid panic during forced reboot due to aborted journal Jan Kara
@ 2019-05-17 21:50 ` Theodore Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2019-05-17 21:50 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-ext4

On Wed, May 15, 2019 at 12:46:22PM +0200, Jan Kara wrote:
> Handling of aborted journal is a special code path different from
> standard ext4_error() one and it can call panic() as well. Commit
> 1dc1097ff60e ("ext4: avoid panic during forced reboot") forgot to update
> this path so fix that omission.
> 
> Fixes: 1dc1097ff60e ("ext4: avoid panic during forced reboot")
> Signed-off-by: Jan Kara <jack@suse.cz>

Thanks, applied.

					- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-17 21:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-15 10:46 [PATCH] ext4: Avoid panic during forced reboot due to aborted journal Jan Kara
2019-05-17 21:50 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).