aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_extfree_item.c
diff options
context:
space:
mode:
authorGravatar Christoph Hellwig <hch@lst.de> 2020-04-30 12:52:21 -0700
committerGravatar Darrick J. Wong <darrick.wong@oracle.com> 2020-05-04 09:03:16 -0700
commit13a8333339072b8654c1d2c75550ee9f41ee15de (patch)
tree178b38fecfb8958d504dceccf07f4684b745ccd5 /fs/xfs/xfs_extfree_item.c
parentxfs: merge the ->diff_items defer op into ->create_intent (diff)
downloadlinux-13a8333339072b8654c1d2c75550ee9f41ee15de.tar.gz
linux-13a8333339072b8654c1d2c75550ee9f41ee15de.tar.bz2
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_extfree_item.c')
-rw-r--r--fs/xfs/xfs_extfree_item.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c
index 3e10eba9d22b..0453b6f2b1d6 100644
--- a/fs/xfs/xfs_extfree_item.c
+++ b/fs/xfs/xfs_extfree_item.c
@@ -437,7 +437,7 @@ xfs_extent_free_log_item(
extp->ext_len = free->xefi_blockcount;
}
-STATIC void *
+static struct xfs_log_item *
xfs_extent_free_create_intent(
struct xfs_trans *tp,
struct list_head *items,
@@ -455,17 +455,17 @@ xfs_extent_free_create_intent(
list_sort(mp, items, xfs_extent_free_diff_items);
list_for_each_entry(free, items, xefi_list)
xfs_extent_free_log_item(tp, efip, free);
- return efip;
+ return &efip->efi_item;
}
/* Get an EFD so we can process all the free extents. */
STATIC void *
xfs_extent_free_create_done(
struct xfs_trans *tp,
- void *intent,
+ struct xfs_log_item *intent,
unsigned int count)
{
- return xfs_trans_get_efd(tp, intent, count);
+ return xfs_trans_get_efd(tp, EFI_ITEM(intent), count);
}
/* Process a free extent. */
@@ -491,9 +491,9 @@ xfs_extent_free_finish_item(
/* Abort all pending EFIs. */
STATIC void
xfs_extent_free_abort_intent(
- void *intent)
+ struct xfs_log_item *intent)
{
- xfs_efi_release(intent);
+ xfs_efi_release(EFI_ITEM(intent));
}
/* Cancel a free extent. */