Преглед на файлове

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
Darrick J. Wong преди 11 години
родител
ревизия
064d83892e
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      fs/jbd2/recovery.c

+ 1 - 0
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;
 			}