Skip to content

Commit 064d838

Browse files
djwongtytso
authored andcommitted
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: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Cc: stable@vger.kernel.org
1 parent a0626e7 commit 064d838

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎fs/jbd2/recovery.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ static int do_one_pass(journal_t *journal,
525525
!jbd2_descr_block_csum_verify(journal,
526526
bh->b_data)) {
527527
err = -EIO;
528+
brelse(bh);
528529
goto failed;
529530
}
530531

0 commit comments

Comments
 (0)