summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_util.c
diff options
context:
space:
mode:
authorBrian Foster2018-07-24 22:43:15 +0200
committerDarrick J. Wong2018-07-26 19:15:16 +0200
commit9e28a242be65b8274742425ca5d146f366205a90 (patch)
treea1367cc42195321646f26fb47d433258a6f706ea /fs/xfs/xfs_bmap_util.c
parentxfs: remove unnecessary dfops init calls in xattr code (diff)
downloadkernel-qcow2-linux-9e28a242be65b8274742425ca5d146f366205a90.tar.gz
kernel-qcow2-linux-9e28a242be65b8274742425ca5d146f366205a90.tar.xz
kernel-qcow2-linux-9e28a242be65b8274742425ca5d146f366205a90.zip
xfs: drop unnecessary xfs_defer_finish() dfops parameter
Every caller of xfs_defer_finish() now passes the transaction and its associated ->t_dfops. The xfs_defer_ops parameter is therefore no longer necessary and can be removed. Since most xfs_defer_finish() callers also have to consider xfs_defer_cancel() on error, update the latter to also receive the transaction for consistency. The log recovery code contains an outlier case that cancels a dfops directly without an available transaction. Retain an internal wrapper to support this outlier case for the time being. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Bill O'Donnell <billodo@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> 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_util.c')
-rw-r--r--fs/xfs/xfs_bmap_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index ddb5f1200d3d..c32ec17048f5 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1624,7 +1624,7 @@ xfs_swap_extent_rmap(
goto out_defer;
xfs_defer_ijoin(tp->t_dfops, ip);
- error = xfs_defer_finish(tpp, tp->t_dfops);
+ error = xfs_defer_finish(tpp);
tp = *tpp;
if (error)
goto out_defer;
@@ -1645,7 +1645,7 @@ xfs_swap_extent_rmap(
return 0;
out_defer:
- xfs_defer_cancel(tp->t_dfops);
+ xfs_defer_cancel(tp);
out:
trace_xfs_swap_extent_rmap_error(ip, error, _RET_IP_);
tip->i_d.di_flags2 = tip_flags2;