If repair encounters a dir node block that fails checksum or
verification, free the buffer before the directory gets rebuilt.
Reported-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
}
/* 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);