diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-01-24 02:01:17 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-01-26 23:32:26 +0100 |
commit | 0e3eccce5e0e438bc1aa3c2913221d3d43a1bef4 (patch) | |
tree | c001ef5c0ecbaf2059cc17a0686a7c6f4bbc7ce7 /fs/xfs/xfs_buf.h | |
parent | xfs: make xfs_buf_get_uncached return an error code (diff) | |
download | linux-0e3eccce5e0e438bc1aa3c2913221d3d43a1bef4.tar.xz linux-0e3eccce5e0e438bc1aa3c2913221d3d43a1bef4.zip |
xfs: make xfs_buf_read return an error code
Convert xfs_buf_read() to return numeric error codes like most
everywhere else in xfs.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_buf.h')
-rw-r--r-- | fs/xfs/xfs_buf.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h index 7f7bd1edd99e..aa145ad25e9a 100644 --- a/fs/xfs/xfs_buf.h +++ b/fs/xfs/xfs_buf.h @@ -213,22 +213,18 @@ xfs_buf_get( return xfs_buf_get_map(target, &map, 1, 0, bpp); } -static inline struct xfs_buf * +static inline int xfs_buf_read( struct xfs_buftarg *target, xfs_daddr_t blkno, size_t numblks, xfs_buf_flags_t flags, + struct xfs_buf **bpp, const struct xfs_buf_ops *ops) { - struct xfs_buf *bp; - int error; DEFINE_SINGLE_BUF_MAP(map, blkno, numblks); - error = xfs_buf_read_map(target, &map, 1, flags, &bp, ops); - if (error) - return NULL; - return bp; + return xfs_buf_read_map(target, &map, 1, flags, bpp, ops); } static inline void |