diff options
author | Christoph Hellwig <hch@lst.de> | 2019-06-29 04:27:36 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-06-29 04:27:36 +0200 |
commit | 73f0d23633c10d311a14a0cadb75fff2faa73688 (patch) | |
tree | fba7867cd2503372f72100f7763b63c944c8bc5a /fs/xfs/xfs_bmap_item.c | |
parent | xfs: merge xfs_rud_init into xfs_trans_get_rud (diff) | |
download | linux-73f0d23633c10d311a14a0cadb75fff2faa73688.tar.xz linux-73f0d23633c10d311a14a0cadb75fff2faa73688.zip |
xfs: merge xfs_bud_init into xfs_trans_get_bud
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_bmap_item.c')
-rw-r--r-- | fs/xfs/xfs_bmap_item.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/xfs/xfs_bmap_item.c b/fs/xfs/xfs_bmap_item.c index e99b82e592a5..c4675ac6411b 100644 --- a/fs/xfs/xfs_bmap_item.c +++ b/fs/xfs/xfs_bmap_item.c @@ -213,22 +213,20 @@ static const struct xfs_item_ops xfs_bud_item_ops = { .iop_release = xfs_bud_item_release, }; -/* - * Allocate and initialize an bud item with the given number of extents. - */ struct xfs_bud_log_item * -xfs_bud_init( - struct xfs_mount *mp, +xfs_trans_get_bud( + struct xfs_trans *tp, struct xfs_bui_log_item *buip) - { - struct xfs_bud_log_item *budp; + struct xfs_bud_log_item *budp; budp = kmem_zone_zalloc(xfs_bud_zone, KM_SLEEP); - xfs_log_item_init(mp, &budp->bud_item, XFS_LI_BUD, &xfs_bud_item_ops); + xfs_log_item_init(tp->t_mountp, &budp->bud_item, XFS_LI_BUD, + &xfs_bud_item_ops); budp->bud_buip = buip; budp->bud_format.bud_bui_id = buip->bui_format.bui_id; + xfs_trans_add_item(tp, &budp->bud_item); return budp; } |