summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2018-07-11 22:26:18 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-07-11 22:26:18 -0700
commitd5669ed58175f85d2c13e914c5c4e2bd3647d893 (patch)
treeedf61cd262dbc9dbe43eecfe2819d61db9f5ed08 /fs/xfs
parent27356a063a8572b2d3bf57d92b0a12399478958a (diff)
xfs: use ->t_dfops in reflink cow recover path
Use ->t_dfops of the leftover COW reservation cleanup transaction. Signed-off-by: Brian Foster <bfoster@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')
-rw-r--r--fs/xfs/libxfs/xfs_refcount.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/xfs/libxfs/xfs_refcount.c b/fs/xfs/libxfs/xfs_refcount.c
index 8e330a196060..df67821fb5f4 100644
--- a/fs/xfs/libxfs/xfs_refcount.c
+++ b/fs/xfs/libxfs/xfs_refcount.c
@@ -1692,18 +1692,19 @@ xfs_refcount_recover_cow_leftovers(
/* Free the orphan record */
xfs_defer_init(&dfops, &fsb);
+ tp->t_dfops = &dfops;
agbno = rr->rr_rrec.rc_startblock - XFS_REFC_COW_START;
fsb = XFS_AGB_TO_FSB(mp, agno, agbno);
- error = xfs_refcount_free_cow_extent(mp, &dfops, fsb,
+ error = xfs_refcount_free_cow_extent(mp, tp->t_dfops, fsb,
rr->rr_rrec.rc_blockcount);
if (error)
goto out_defer;
/* Free the block. */
- xfs_bmap_add_free(mp, &dfops, fsb,
+ xfs_bmap_add_free(mp, tp->t_dfops, fsb,
rr->rr_rrec.rc_blockcount, NULL);
- error = xfs_defer_finish(&tp, &dfops);
+ error = xfs_defer_finish(&tp, tp->t_dfops);
if (error)
goto out_defer;
@@ -1717,7 +1718,7 @@ xfs_refcount_recover_cow_leftovers(
return error;
out_defer:
- xfs_defer_cancel(&dfops);
+ xfs_defer_cancel(tp->t_dfops);
out_trans:
xfs_trans_cancel(tp);
out_free: