[PATCH 05/10] xfs: remove the total argument to xfs_bmap_local_to_extents

Christoph Hellwig
2017-04-13T08:05:42Z

It must inherently be the same as the minlen/maxlen arguments for
this allocation.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/libxfs/xfs_bmap.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index aec4907056ba..53f1386b1868 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -867,7 +867,6 @@ xfs_bmap_local_to_extents(
xfs_trans_t *tp, /* transaction pointer */
xfs_inode_t *ip, /* incore inode pointer */
xfs_fsblock_t *firstblock, /* first block allocated in xaction */
- xfs_extlen_t total, /* total blocks needed by transaction */
int *logflagsp, /* inode logging flags */
int whichfork,
void (*init_fn)(struct xfs_trans *tp,
@@ -916,8 +915,7 @@ xfs_bmap_local_to_extents(
args.fsbno = *firstblock;
args.type = XFS_ALLOCTYPE_NEAR_BNO;
}
- args.total = total;
- args.minlen = args.maxlen = args.prod = 1;
+ args.total = args.minlen = args.maxlen = args.prod = 1;
error = xfs_alloc_vextent(&args);
if (error)
goto done;
@@ -1067,7 +1065,7 @@ xfs_bmap_add_attrfork_local(
}

if (S_ISLNK(VFS_I(ip)->i_mode))
- return xfs_bmap_local_to_extents(tp, ip, firstblock, 1,
+ return xfs_bmap_local_to_extents(tp, ip, firstblock,
flags, XFS_DATA_FORK,
xfs_symlink_local_to_remote);

--
2.11.0