summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2014-09-16 14:43:09 -0400
committerTheodore Ts'o <tytso@mit.edu>2014-09-16 14:43:09 -0400
commit064d83892e9ba547f7d4eae22cbca066d95210ce (patch)
treecd936264dcaf940ffdb2d496f6c05b2287610b06 /fs
parenta0626e75954078cfacddb00a4545dde821170bc5 (diff)
downloadop-kernel-dev-064d83892e9ba547f7d4eae22cbca066d95210ce.zip
op-kernel-dev-064d83892e9ba547f7d4eae22cbca066d95210ce.tar.gz
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
Diffstat (limited to 'fs')
-rw-r--r--fs/jbd2/recovery.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index 9b329b5..bcbef08 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -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;
}
OpenPOWER on IntegriCloud