From 841263e93310595c30653a9f530b2d7bbeed5aae Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 23 Jan 2020 17:01:16 -0800 Subject: xfs: make xfs_buf_get return an error code Convert xfs_buf_get() to return numeric error codes like most everywhere else in xfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner --- fs/xfs/xfs_buf.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'fs/xfs/xfs_buf.h') diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h index f58147354b02..c3aa4e322243 100644 --- a/fs/xfs/xfs_buf.h +++ b/fs/xfs/xfs_buf.h @@ -201,20 +201,16 @@ void xfs_buf_readahead_map(struct xfs_buftarg *target, struct xfs_buf_map *map, int nmaps, const struct xfs_buf_ops *ops); -static inline struct xfs_buf * +static inline int xfs_buf_get( struct xfs_buftarg *target, xfs_daddr_t blkno, - size_t numblks) + size_t numblks, + struct xfs_buf **bpp) { - struct xfs_buf *bp; - int error; DEFINE_SINGLE_BUF_MAP(map, blkno, numblks); - error = xfs_buf_get_map(target, &map, 1, 0, &bp); - if (error) - return NULL; - return bp; + return xfs_buf_get_map(target, &map, 1, 0, bpp); } static inline struct xfs_buf * -- cgit v1.2.3-59-g8ed1b