aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans.h
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-01-23 17:01:18 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-01-26 14:32:26 -0800
commitce92464c180b60e79022bdf1175b7737a11f59b7 (patch)
tree1b5b3940704bc06496dce4b8166e073fe26e4f4f /fs/xfs/xfs_trans.h
parentxfs: make xfs_trans_get_buf_map return an error code (diff)
downloadlinux-dev-ce92464c180b60e79022bdf1175b7737a11f59b7.tar.xz
linux-dev-ce92464c180b60e79022bdf1175b7737a11f59b7.zip
xfs: make xfs_trans_get_buf return an error code
Convert xfs_trans_get_buf() 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 '')
-rw-r--r--fs/xfs/xfs_trans.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index a0be934ec811..752c7fef9de7 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -173,22 +173,17 @@ int xfs_trans_get_buf_map(struct xfs_trans *tp, struct xfs_buftarg *target,
struct xfs_buf_map *map, int nmaps, xfs_buf_flags_t flags,
struct xfs_buf **bpp);
-static inline struct xfs_buf *
+static inline int
xfs_trans_get_buf(
struct xfs_trans *tp,
struct xfs_buftarg *target,
xfs_daddr_t blkno,
int numblks,
- uint flags)
+ uint flags,
+ struct xfs_buf **bpp)
{
- struct xfs_buf *bp;
- int error;
-
DEFINE_SINGLE_BUF_MAP(map, blkno, numblks);
- error = xfs_trans_get_buf_map(tp, target, &map, 1, flags, &bp);
- if (error)
- return NULL;
- return bp;
+ return xfs_trans_get_buf_map(tp, target, &map, 1, flags, bpp);
}
int xfs_trans_read_buf_map(struct xfs_mount *mp,