summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_defer.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-04-30 12:52:20 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-05-04 09:03:16 -0700
commitc1f09188e8de0ae65433cb9c8ace4feb66359bcc (patch)
tree9fef07057a732be3ad0a2616ff6059d24231b4b3 /fs/xfs/libxfs/xfs_defer.c
parente046e949486ec92d83b2ccdf0e7e9144f74ef028 (diff)
xfs: merge the ->log_item defer op into ->create_intent
These are aways called together, and my merging them we reduce the amount of indirect calls, improve type safety and in general clean up the code a bit. 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/libxfs/xfs_defer.c')
-rw-r--r--fs/xfs/libxfs/xfs_defer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c
index 8a38da602b7d..56d1357f9d13 100644
--- a/fs/xfs/libxfs/xfs_defer.c
+++ b/fs/xfs/libxfs/xfs_defer.c
@@ -185,14 +185,12 @@ xfs_defer_create_intent(
bool sort)
{
const struct xfs_defer_op_type *ops = defer_op_types[dfp->dfp_type];
- struct list_head *li;
if (sort)
list_sort(tp->t_mountp, &dfp->dfp_work, ops->diff_items);
- dfp->dfp_intent = ops->create_intent(tp, dfp->dfp_count);
- list_for_each(li, &dfp->dfp_work)
- ops->log_item(tp, dfp->dfp_intent, li);
+ dfp->dfp_intent = ops->create_intent(tp, &dfp->dfp_work,
+ dfp->dfp_count);
}
/*