Re: [PATCH] xfs_repair: release corrupt directory node buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/3/15 11:21 PM, Darrick J. Wong wrote:
> 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@xxxxxxxxxxx>
> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> ---
>  repair/dir2.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/repair/dir2.c b/repair/dir2.c
> index a5646f8..54c49eb 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);
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
> 

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux