Message ID | 158216301140.602314.6904049540452018739.stgit@magnolia (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | xfsprogs: refactor buffer function names | expand |
On Wed, Feb 19, 2020 at 05:43:31PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@oracle.com> > > Make libxfs_readbufr stash the error value in b_error, which will make > the behavior consistent between regular and multi-mapping buffers. > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c index 24c5eaf6..51f93c3e 100644 --- a/libxfs/rdwr.c +++ b/libxfs/rdwr.c @@ -940,6 +940,7 @@ libxfs_readbufr(struct xfs_buftarg *btp, xfs_daddr_t blkno, xfs_buf_t *bp, pthread_self(), __FUNCTION__, bytes, error, (long long)LIBXFS_BBTOOFF64(blkno), (long long)blkno, bp); #endif + bp->b_error = error; return error; } @@ -999,9 +1000,7 @@ libxfs_readbuf( * contents. *cough* xfs_da_node_buf_ops *cough*. */ error = libxfs_readbufr(btp, blkno, bp, len, flags); - if (error) - bp->b_error = error; - else + if (!error) libxfs_readbuf_verify(bp, ops); return bp; }