Skip to content

Commit

Permalink
jbd2: free bh when descriptor block checksum fails
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Reviewed-by: Eric Sandeen <[email protected]>
Cc: [email protected]
  • Loading branch information
djwong authored and tytso committed Sep 16, 2014
1 parent a0626e7 commit 064d838
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/jbd2/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 064d838

Please sign in to comment.