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:
@@ -341,13 +341,17 @@ xrep_init_btblock(
|
||||
struct xfs_trans *tp = sc->tp;
|
||||
struct xfs_mount *mp = sc->mp;
|
||||
struct xfs_buf *bp;
|
||||
int error;
|
||||
|
||||
trace_xrep_init_btblock(mp, XFS_FSB_TO_AGNO(mp, fsb),
|
||||
XFS_FSB_TO_AGBNO(mp, fsb), btnum);
|
||||
|
||||
ASSERT(XFS_FSB_TO_AGNO(mp, fsb) == sc->sa.agno);
|
||||
bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, XFS_FSB_TO_DADDR(mp, fsb),
|
||||
XFS_FSB_TO_BB(mp, 1), 0);
|
||||
error = xfs_trans_get_buf(tp, mp->m_ddev_targp,
|
||||
XFS_FSB_TO_DADDR(mp, fsb), XFS_FSB_TO_BB(mp, 1), 0,
|
||||
&bp);
|
||||
if (error)
|
||||
return error;
|
||||
xfs_buf_zero(bp, 0, BBTOB(bp->b_length));
|
||||
xfs_btree_init_block(mp, bp, btnum, 0, 0, sc->sa.agno);
|
||||
xfs_trans_buf_set_type(tp, bp, XFS_BLFT_BTREE_BUF);
|
||||
|
Reference in New Issue
Block a user