mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-30 04:06:42 +08:00
e2fsck: free bh when descriptor block checksum fails
Free the buffer head if the journal descriptor block fails checksum verification. This has been patched before (see "e2fsck: free bh on csum verify error in do_one_pass") but apparently the patch was never committed to jbd2 in the kernel, so when we resync'd the recovery code with 3.16, the bug came back. Sigh. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Cc: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
This commit is contained in:
parent
7ef1b8b424
commit
c10700f974
@ -525,6 +525,7 @@ static int do_one_pass(journal_t *journal,
|
||||
!jbd2_descr_block_csum_verify(journal,
|
||||
bh->b_data)) {
|
||||
err = -EIO;
|
||||
brelse(bh);
|
||||
goto failed;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user