summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2020-06-17 11:25:49 +0200
committerTheodore Ts'o <tytso@mit.edu>2020-08-06 00:11:15 -0400
commit24dc9864914eb5813173cfa53313fcd02e4aea7d (patch)
tree2b3e054ab02789f1b05c8465a2685e116daa8cd6 /tools
parente030a28810daf48b43ef6e92fa502ae410b12c8c (diff)
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>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions