Re: [PATCH 05/13] xfs: make xfs_buf_read_map return an error code

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

 



On Mon, Jan 20, 2020 at 02:57:01PM -0800, Darrick J. Wong wrote:
> @@ -831,7 +833,8 @@ xfs_buf_read_map(
>  		XFS_STATS_INC(target->bt_mount, xb_get_read);
>  		bp->b_ops = ops;
>  		_xfs_buf_read(bp, flags);
> -		return bp;
> +		*bpp = bp;
> +		return 0;

_xfs_buf_read can return an error, and we are losing that here.  So
we should return the value from _xfs_buf_read, an ensure *bpp is NULL
if it returns an error.  That also means all the b_error check in the
callers of xfs_buf_read_map and xfs_buf_read (and with that the biggest
wart in the buffer cache API) can go away.



[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