Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
			}