From: Brian Foster Date: Thu, 4 Oct 2018 19:38:01 +0000 (-0500) Subject: xfs: use ->t_dfops in reflink cow recover path X-Git-Tag: v4.19.0-rc0~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f50f99f45f7ac8490574d9252787703db3d9b4ce;p=thirdparty%2Fxfsprogs-dev.git xfs: use ->t_dfops in reflink cow recover path Source kernel commit: d5669ed58175f85d2c13e914c5c4e2bd3647d893 Use ->t_dfops of the leftover COW reservation cleanup transaction. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_refcount.c b/libxfs/xfs_refcount.c index cc2e720f2..d7d1bb8a8 100644 --- a/libxfs/xfs_refcount.c +++ b/libxfs/xfs_refcount.c @@ -1691,18 +1691,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; @@ -1716,7 +1717,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: