From 9e28a242be65b8274742425ca5d146f366205a90 Mon Sep 17 00:00:00 2001 From: Brian Foster Date: Tue, 24 Jul 2018 13:43:15 -0700 Subject: 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 Reviewed-by: Bill O'Donnell Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- fs/xfs/xfs_reflink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fs/xfs/xfs_reflink.c') diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index a653739c9fb2..68b6921dc3f6 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -518,9 +518,9 @@ xfs_reflink_cancel_cow_blocks( /* Roll the transaction */ xfs_defer_ijoin((*tpp)->t_dfops, ip); - error = xfs_defer_finish(tpp, (*tpp)->t_dfops); + error = xfs_defer_finish(tpp); if (error) { - xfs_defer_cancel((*tpp)->t_dfops); + xfs_defer_cancel(*tpp); break; } @@ -716,7 +716,7 @@ xfs_reflink_end_cow( xfs_bmap_del_extent_cow(ip, &icur, &got, &del); xfs_defer_ijoin(tp->t_dfops, ip); - error = xfs_defer_finish(&tp, tp->t_dfops); + error = xfs_defer_finish(&tp); if (error) goto out_cancel; if (!xfs_iext_get_extent(ifp, &icur, &got)) @@ -1077,7 +1077,7 @@ xfs_reflink_remap_extent( next_extent: /* Process all the deferred stuff. */ xfs_defer_ijoin(tp->t_dfops, ip); - error = xfs_defer_finish(&tp, tp->t_dfops); + error = xfs_defer_finish(&tp); if (error) goto out_cancel; } -- cgit v1.2.3