linux/fs/jbd2
zhangyi (F) 494c30b805 ext4, jbd2: ensure panic when aborting with zero errno
[ Upstream commit 51f57b01e4 ]

JBD2_REC_ERR flag used to indicate the errno has been updated when jbd2
aborted, and then __ext4_abort() and ext4_handle_error() can invoke
panic if ERRORS_PANIC is specified. But if the journal has been aborted
with zero errno, jbd2_journal_abort() didn't set this flag so we can
no longer panic. Fix this by always record the proper errno in the
journal superblock.

Fixes: 4327ba52af ("ext4, jbd2: ensure entering into panic after recording an error in superblock")
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191204124614.45424-3-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-24 08:36:30 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
checkpoint.c ext4, jbd2: ensure panic when aborting with zero errno 2020-02-24 08:36:30 +01:00
commit.c jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer 2020-02-19 19:53:09 +01:00
journal.c ext4, jbd2: ensure panic when aborting with zero errno 2020-02-24 08:36:30 +01:00
recovery.c jbd2: clarify bad journal block checksum message 2018-02-18 21:33:13 -05:00
revoke.c jbd2: flush_descriptor(): Do not decrease buffer head's ref count 2019-08-11 16:29:41 -04:00
transaction.c jbd2: move the clearing of b_modified flag to the journal_unmap_buffer() 2020-02-19 19:53:09 +01:00