summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_rmap_item.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-28 19:27:36 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-06-28 19:27:36 -0700
commit60883447f45226d95be3b213c32d255db23ab4e6 (patch)
treebdaf64f89c33add5f56b58b1421bb59767da6140 /fs/xfs/xfs_rmap_item.c
parentebeb8e062906e1f715908e3e339eb197b7121ad0 (diff)
downloadlwn-60883447f45226d95be3b213c32d255db23ab4e6.tar.gz
lwn-60883447f45226d95be3b213c32d255db23ab4e6.zip
xfs: merge xfs_rud_init into xfs_trans_get_rud
There is no good reason to keep these two functions separate. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_rmap_item.c')
-rw-r--r--fs/xfs/xfs_rmap_item.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/xfs/xfs_rmap_item.c b/fs/xfs/xfs_rmap_item.c
index c2f6acdc593d..7f903de481df 100644
--- a/fs/xfs/xfs_rmap_item.c
+++ b/fs/xfs/xfs_rmap_item.c
@@ -238,22 +238,20 @@ static const struct xfs_item_ops xfs_rud_item_ops = {
.iop_release = xfs_rud_item_release,
};
-/*
- * Allocate and initialize an rud item with the given number of extents.
- */
struct xfs_rud_log_item *
-xfs_rud_init(
- struct xfs_mount *mp,
+xfs_trans_get_rud(
+ struct xfs_trans *tp,
struct xfs_rui_log_item *ruip)
-
{
- struct xfs_rud_log_item *rudp;
+ struct xfs_rud_log_item *rudp;
rudp = kmem_zone_zalloc(xfs_rud_zone, KM_SLEEP);
- xfs_log_item_init(mp, &rudp->rud_item, XFS_LI_RUD, &xfs_rud_item_ops);
+ xfs_log_item_init(tp->t_mountp, &rudp->rud_item, XFS_LI_RUD,
+ &xfs_rud_item_ops);
rudp->rud_ruip = ruip;
rudp->rud_format.rud_rui_id = ruip->rui_format.rui_id;
+ xfs_trans_add_item(tp, &rudp->rud_item);
return rudp;
}