Commit 064d8389 authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Theodore Ts'o

jbd2: free bh when descriptor block checksum fails

Free the buffer head if the journal descriptor block fails checksum
verification.

This is the jbd2 port of the e2fsprogs patch "e2fsck: free bh on csum
verify error in do_one_pass".
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Reviewed-by: default avatarEric Sandeen <sandeen@redhat.com>
Cc: stable@vger.kernel.org
parent a0626e75
...@@ -525,6 +525,7 @@ static int do_one_pass(journal_t *journal, ...@@ -525,6 +525,7 @@ static int do_one_pass(journal_t *journal,
!jbd2_descr_block_csum_verify(journal, !jbd2_descr_block_csum_verify(journal,
bh->b_data)) { bh->b_data)) {
err = -EIO; err = -EIO;
brelse(bh);
goto failed; goto failed;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment