linux_dsm_epyc7002/fs/jbd2
Lukas Czerner 24dc986491 jbd2: make sure jh have b_transaction set in refile/unfile_buffer
Callers of __jbd2_journal_unfile_buffer() and
__jbd2_journal_refile_buffer() assume that the b_transaction is set. In
fact if it's not, we can end up with journal_head refcounting errors
leading to crash much later that might be very hard to track down. Add
asserts to make sure that is the case.

We also make sure that b_next_transaction is NULL in
__jbd2_journal_unfile_buffer() since the callers expect that as well and
we should not get into that stage in this state anyway, leading to
problems later on if we do.

Tested with fstests.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20200617092549.6712-1-lczerner@redhat.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2020-08-06 00:11:15 -04:00
..
checkpoint.c block: remove the error_sector argument to blkdev_issue_flush 2020-05-22 08:45:46 -06:00
commit.c block: remove the error_sector argument to blkdev_issue_flush 2020-05-22 08:45:46 -06:00
journal.c ext4, jbd2: ensure panic by fix a race between jbd2 abort and ext4 error handlers 2020-06-12 14:51:41 -04: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
recovery.c block: remove the error_sector argument to blkdev_issue_flush 2020-05-22 08:45:46 -06:00
revoke.c jbd2: Reserve space for revoke descriptor blocks 2019-11-05 16:00:48 -05:00
transaction.c jbd2: make sure jh have b_transaction set in refile/unfile_buffer 2020-08-06 00:11:15 -04:00