summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_da_btree.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-20 09:46:05 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-22 08:17:10 -0800
commit2911edb653b9c64e0aad461f308cae8ce030eb7b (patch)
tree684ffd9a00e1cb2b746d1d39343cda92b3ea600d /fs/xfs/libxfs/xfs_da_btree.c
parentcd2c9f1b544b8f5e1ca1874032fd669d74946a6d (diff)
xfs: remove the mappedbno argument to xfs_da_get_buf
Use the xfs_da_get_buf_daddr function directly for the two callers that pass a mapped disk address, and then remove the mappedbno argument. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_da_btree.c')
-rw-r--r--fs/xfs/libxfs/xfs_da_btree.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/fs/xfs/libxfs/xfs_da_btree.c b/fs/xfs/libxfs/xfs_da_btree.c
index c00983034c78..8c3eafe280ed 100644
--- a/fs/xfs/libxfs/xfs_da_btree.c
+++ b/fs/xfs/libxfs/xfs_da_btree.c
@@ -429,7 +429,7 @@ xfs_da3_node_create(
trace_xfs_da_node_create(args);
ASSERT(level <= XFS_DA_NODE_MAXDEPTH);
- error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, whichfork);
+ error = xfs_da_get_buf(tp, dp, blkno, &bp, whichfork);
if (error)
return error;
bp->b_ops = &xfs_da3_node_buf_ops;
@@ -656,7 +656,7 @@ xfs_da3_root_split(
dp = args->dp;
tp = args->trans;
- error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, args->whichfork);
+ error = xfs_da_get_buf(tp, dp, blkno, &bp, args->whichfork);
if (error)
return error;
node = bp->b_addr;
@@ -2577,7 +2577,6 @@ xfs_da_get_buf(
struct xfs_trans *tp,
struct xfs_inode *dp,
xfs_dablk_t bno,
- xfs_daddr_t mappedbno,
struct xfs_buf **bpp,
int whichfork)
{
@@ -2588,22 +2587,11 @@ xfs_da_get_buf(
int error;
*bpp = NULL;
-
- if (mappedbno >= 0) {
- bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, mappedbno,
- XFS_FSB_TO_BB(mp,
- xfs_dabuf_nfsb(mp, whichfork)), 0);
- goto done;
- }
-
- error = xfs_dabuf_map(dp, bno,
- mappedbno == -1 ? XFS_DABUF_MAP_HOLE_OK : 0,
- whichfork, &mapp, &nmap);
+ error = xfs_dabuf_map(dp, bno, 0, whichfork, &mapp, &nmap);
if (error || nmap == 0)
goto out_free;
bp = xfs_trans_get_buf_map(tp, mp->m_ddev_targp, mapp, nmap, 0);
-done:
error = bp ? bp->b_error : -EIO;
if (error) {
if (bp)