Commit 60883447 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: merge xfs_rud_init into xfs_trans_get_rud

There is no good reason to keep these two functions separate.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent ebeb8e06
......@@ -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;
}
......
......@@ -78,8 +78,6 @@ extern struct kmem_zone *xfs_rui_zone;
extern struct kmem_zone *xfs_rud_zone;
struct xfs_rui_log_item *xfs_rui_init(struct xfs_mount *, uint);
struct xfs_rud_log_item *xfs_rud_init(struct xfs_mount *,
struct xfs_rui_log_item *);
int xfs_rui_copy_format(struct xfs_log_iovec *buf,
struct xfs_rui_log_format *dst_rui_fmt);
void xfs_rui_item_free(struct xfs_rui_log_item *);
......
......@@ -60,18 +60,6 @@ xfs_trans_set_rmap_flags(
}
}
struct xfs_rud_log_item *
xfs_trans_get_rud(
struct xfs_trans *tp,
struct xfs_rui_log_item *ruip)
{
struct xfs_rud_log_item *rudp;
rudp = xfs_rud_init(tp->t_mountp, ruip);
xfs_trans_add_item(tp, &rudp->rud_item);
return rudp;
}
/*
* Finish an rmap update and log it to the RUD. Note that the transaction is
* marked dirty regardless of whether the rmap update succeeds or fails to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment