From: Darrick J. Wong Date: Mon, 7 Sep 2015 00:13:41 +0000 (+1000) Subject: xfs_repair: release corrupt directory node buffer X-Git-Tag: v4.2.0~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6253053fd8e3093a075a501ca47953ed3601f0f;p=thirdparty%2Fxfsprogs-dev.git xfs_repair: release corrupt directory node buffer If repair encounters a dir node block that fails checksum or verification, free the buffer before the directory gets rebuilt. Reported-by: Eric Sandeen Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Reviewed-by: Carlos Maiolino Signed-off-by: Dave Chinner --- diff --git a/repair/dir2.c b/repair/dir2.c index a5646f884..54c49ebae 100644 --- a/repair/dir2.c +++ b/repair/dir2.c @@ -200,6 +200,7 @@ _("bad dir magic number 0x%x in inode %" PRIu64 " bno = %u\n"), } /* corrupt node; rebuild the dir. */ if (bp->b_error == -EFSBADCRC || bp->b_error == -EFSCORRUPTED) { + libxfs_putbuf(bp); do_warn( _("corrupt tree block %u for directory inode %" PRIu64 "\n"), bno, da_cursor->ino);