Skip to content

Commit eef519d

Browse files
Christoph HellwigChandan Babu R
authored andcommitted
xfs: remove the xfs_alloc_arg argument to xfs_bmap_btalloc_accounting
xfs_bmap_btalloc_accounting only uses the len field from args, but that has just been propagated to ap->length field by the caller. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
1 parent 825b49e commit eef519d

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

fs/xfs/libxfs/xfs_bmap.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3265,8 +3265,7 @@ xfs_bmap_btalloc_select_lengths(
32653265
/* Update all inode and quota accounting for the allocation we just did. */
32663266
static void
32673267
xfs_bmap_btalloc_accounting(
3268-
struct xfs_bmalloca *ap,
3269-
struct xfs_alloc_arg *args)
3268+
struct xfs_bmalloca *ap)
32703269
{
32713270
if (ap->flags & XFS_BMAPI_COWFORK) {
32723271
/*
@@ -3279,7 +3278,7 @@ xfs_bmap_btalloc_accounting(
32793278
* yet.
32803279
*/
32813280
if (ap->wasdel) {
3282-
xfs_mod_delalloc(ap->ip->i_mount, -(int64_t)args->len);
3281+
xfs_mod_delalloc(ap->ip->i_mount, -(int64_t)ap->length);
32833282
return;
32843283
}
32853284

@@ -3291,22 +3290,22 @@ xfs_bmap_btalloc_accounting(
32913290
* This essentially transfers the transaction quota reservation
32923291
* to that of a delalloc extent.
32933292
*/
3294-
ap->ip->i_delayed_blks += args->len;
3293+
ap->ip->i_delayed_blks += ap->length;
32953294
xfs_trans_mod_dquot_byino(ap->tp, ap->ip, XFS_TRANS_DQ_RES_BLKS,
3296-
-(long)args->len);
3295+
-(long)ap->length);
32973296
return;
32983297
}
32993298

33003299
/* data/attr fork only */
3301-
ap->ip->i_nblocks += args->len;
3300+
ap->ip->i_nblocks += ap->length;
33023301
xfs_trans_log_inode(ap->tp, ap->ip, XFS_ILOG_CORE);
33033302
if (ap->wasdel) {
3304-
ap->ip->i_delayed_blks -= args->len;
3305-
xfs_mod_delalloc(ap->ip->i_mount, -(int64_t)args->len);
3303+
ap->ip->i_delayed_blks -= ap->length;
3304+
xfs_mod_delalloc(ap->ip->i_mount, -(int64_t)ap->length);
33063305
}
33073306
xfs_trans_mod_dquot_byino(ap->tp, ap->ip,
33083307
ap->wasdel ? XFS_TRANS_DQ_DELBCOUNT : XFS_TRANS_DQ_BCOUNT,
3309-
args->len);
3308+
ap->length);
33103309
}
33113310

33123311
static int
@@ -3380,7 +3379,7 @@ xfs_bmap_process_allocated_extent(
33803379
ap->offset = orig_offset;
33813380
else if (ap->offset + ap->length < orig_offset + orig_length)
33823381
ap->offset = orig_offset + orig_length - ap->length;
3383-
xfs_bmap_btalloc_accounting(ap, args);
3382+
xfs_bmap_btalloc_accounting(ap);
33843383
}
33853384

33863385
#ifdef DEBUG

0 commit comments

Comments
 (0)