summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_buf.h
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-01-23 17:01:16 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-01-26 14:32:26 -0800
commit841263e93310595c30653a9f530b2d7bbeed5aae (patch)
tree771485980d00580d565560545b56beb107e1a6b2 /fs/xfs/xfs_buf.h
parent4ed8e27b4f755f50d78dc3d9f9760b60e891f97b (diff)
downloadlwn-841263e93310595c30653a9f530b2d7bbeed5aae.tar.gz
lwn-841263e93310595c30653a9f530b2d7bbeed5aae.zip
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 <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.h12
1 files changed, 4 insertions, 8 deletions
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 *