summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_bmap_item.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-04-30 12:52:21 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-05-04 09:03:16 -0700
commit13a8333339072b8654c1d2c75550ee9f41ee15de (patch)
tree178b38fecfb8958d504dceccf07f4684b745ccd5 /fs/xfs/xfs_bmap_item.c
parentd367a868e46b025a8ced8e00ef2b3a3c2f3bf732 (diff)
xfs: turn dfp_intent into a xfs_log_item
All defer op instance place their own extension of the log item into the dfp_intent field. Replace that with a xfs_log_item to improve type safety and make the code easier to follow. 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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_bmap_item.c b/fs/xfs/xfs_bmap_item.c
index f9505c5873bd..7b2153fca2d9 100644
--- a/fs/xfs/xfs_bmap_item.c
+++ b/fs/xfs/xfs_bmap_item.c
@@ -330,7 +330,7 @@ xfs_bmap_update_log_item(
bmap->bi_bmap.br_state);
}
-STATIC void *
+static struct xfs_log_item *
xfs_bmap_update_create_intent(
struct xfs_trans *tp,
struct list_head *items,
@@ -348,17 +348,17 @@ xfs_bmap_update_create_intent(
list_sort(mp, items, xfs_bmap_update_diff_items);
list_for_each_entry(bmap, items, bi_list)
xfs_bmap_update_log_item(tp, buip, bmap);
- return buip;
+ return &buip->bui_item;
}
/* Get an BUD so we can process all the deferred rmap updates. */
STATIC void *
xfs_bmap_update_create_done(
struct xfs_trans *tp,
- void *intent,
+ struct xfs_log_item *intent,
unsigned int count)
{
- return xfs_trans_get_bud(tp, intent);
+ return xfs_trans_get_bud(tp, BUI_ITEM(intent));
}
/* Process a deferred rmap update. */
@@ -394,9 +394,9 @@ xfs_bmap_update_finish_item(
/* Abort all pending BUIs. */
STATIC void
xfs_bmap_update_abort_intent(
- void *intent)
+ struct xfs_log_item *intent)
{
- xfs_bui_release(intent);
+ xfs_bui_release(BUI_ITEM(intent));
}
/* Cancel a deferred rmap update. */