Commit d5669ed5 authored by Brian Foster's avatar Brian Foster Committed by Darrick J. Wong

xfs: use ->t_dfops in reflink cow recover path

Use ->t_dfops of the leftover COW reservation cleanup transaction.
Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 27356a06
...@@ -1692,18 +1692,19 @@ xfs_refcount_recover_cow_leftovers( ...@@ -1692,18 +1692,19 @@ xfs_refcount_recover_cow_leftovers(
/* Free the orphan record */ /* Free the orphan record */
xfs_defer_init(&dfops, &fsb); xfs_defer_init(&dfops, &fsb);
tp->t_dfops = &dfops;
agbno = rr->rr_rrec.rc_startblock - XFS_REFC_COW_START; agbno = rr->rr_rrec.rc_startblock - XFS_REFC_COW_START;
fsb = XFS_AGB_TO_FSB(mp, agno, agbno); 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); rr->rr_rrec.rc_blockcount);
if (error) if (error)
goto out_defer; goto out_defer;
/* Free the block. */ /* 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); rr->rr_rrec.rc_blockcount, NULL);
error = xfs_defer_finish(&tp, &dfops); error = xfs_defer_finish(&tp, tp->t_dfops);
if (error) if (error)
goto out_defer; goto out_defer;
...@@ -1717,7 +1718,7 @@ xfs_refcount_recover_cow_leftovers( ...@@ -1717,7 +1718,7 @@ xfs_refcount_recover_cow_leftovers(
return error; return error;
out_defer: out_defer:
xfs_defer_cancel(&dfops); xfs_defer_cancel(tp->t_dfops);
out_trans: out_trans:
xfs_trans_cancel(tp); xfs_trans_cancel(tp);
out_free: out_free:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment