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>
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user