diff options
author | Christoph Hellwig <hch@lst.de> | 2020-04-30 12:52:20 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-05-04 09:03:16 -0700 |
commit | c1f09188e8de0ae65433cb9c8ace4feb66359bcc (patch) | |
tree | 9fef07057a732be3ad0a2616ff6059d24231b4b3 /fs/xfs/libxfs/xfs_defer.c | |
parent | e046e949486ec92d83b2ccdf0e7e9144f74ef028 (diff) | |
download | linux-c1f09188e8de0ae65433cb9c8ace4feb66359bcc.tar.gz linux-c1f09188e8de0ae65433cb9c8ace4feb66359bcc.tar.bz2 linux-c1f09188e8de0ae65433cb9c8ace4feb66359bcc.zip |
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.c | 6 |
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); } /* |