aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/xfs/xfs_rmap_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_rmap_item.c
parentxfs: merge the ->diff_items defer op into ->create_intent (diff)
downloadwireguard-linux-13a8333339072b8654c1d2c75550ee9f41ee15de.tar.xz
wireguard-linux-13a8333339072b8654c1d2c75550ee9f41ee15de.zip
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_rmap_item.c')
-rw-r--r--fs/xfs/xfs_rmap_item.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_rmap_item.c b/fs/xfs/xfs_rmap_item.c
index 40567cf0c216..a417e15fd0ce 100644
--- a/fs/xfs/xfs_rmap_item.c
+++ b/fs/xfs/xfs_rmap_item.c
@@ -381,7 +381,7 @@ xfs_rmap_update_log_item(
rmap->ri_bmap.br_state);
}
-STATIC void *
+static struct xfs_log_item *
xfs_rmap_update_create_intent(
struct xfs_trans *tp,
struct list_head *items,
@@ -399,17 +399,17 @@ xfs_rmap_update_create_intent(
list_sort(mp, items, xfs_rmap_update_diff_items);
list_for_each_entry(rmap, items, ri_list)
xfs_rmap_update_log_item(tp, ruip, rmap);
- return ruip;
+ return &ruip->rui_item;
}
/* Get an RUD so we can process all the deferred rmap updates. */
STATIC void *
xfs_rmap_update_create_done(
struct xfs_trans *tp,
- void *intent,
+ struct xfs_log_item *intent,
unsigned int count)
{
- return xfs_trans_get_rud(tp, intent);
+ return xfs_trans_get_rud(tp, RUI_ITEM(intent));
}
/* Process a deferred rmap update. */
@@ -451,9 +451,9 @@ xfs_rmap_update_finish_cleanup(
/* Abort all pending RUIs. */
STATIC void
xfs_rmap_update_abort_intent(
- void *intent)
+ struct xfs_log_item *intent)
{
- xfs_rui_release(intent);
+ xfs_rui_release(RUI_ITEM(intent));
}
/* Cancel a deferred rmap update. */