Re: [PATCH 9/9] xfs: make xfs_btree_get_buf functions return an error code

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

 



> -		if (XFS_IS_CORRUPT(args->mp, !bp)) {
> -			error = -EFSCORRUPTED;
> +		error = xfs_btree_get_bufs(args->mp, args->tp, args->agno,
> +				fbno, &bp);
> +		if (error)

Should we keep the XFS_IS_CORRUPT checks in some form?   Not sure they
matter all that much, though.

>  	ASSERT(fsbno != NULLFSBLOCK);
>  	d = XFS_FSB_TO_DADDR(mp, fsbno);
> -	error = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, 0, &bp);
> -	if (error)
> -		return NULL;
> -	return bp;
> +	return xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, 0, bpp);

Maybe kill the local variable while you're at it?

>  	ASSERT(agno != NULLAGNUMBER);
>  	ASSERT(agbno != NULLAGBLOCK);
>  	d = XFS_AGB_TO_DADDR(mp, agno, agbno);
> -	error = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, 0, &bp);
> -	if (error)
> -		return NULL;
> -	return bp;
> +	return xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, 0, bpp);

Same here.



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux