summaryrefslogtreecommitdiff
path: root/fs/jbd2
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2014-09-16 14:43:09 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-14 08:59:57 -0800
commitbd68851f32f584e645093b8072f270a9829ed7c0 (patch)
tree05ffccd8f8cc1f4c034d05dc8ecb29191f4dfd88 /fs/jbd2
parent8ffd5dfcc5bcae4a4b4b9acd67c37d5d4764aa16 (diff)
downloadkernel-common-bd68851f32f584e645093b8072f270a9829ed7c0.tar.gz
kernel-common-bd68851f32f584e645093b8072f270a9829ed7c0.tar.bz2
kernel-common-bd68851f32f584e645093b8072f270a9829ed7c0.zip
jbd2: free bh when descriptor block checksum fails
commit 064d83892e9ba547f7d4eae22cbca066d95210ce upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/jbd2')
-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 9b329b55ffe3..bcbef08a4d8f 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;
}