Browse Source

xfs: use ->t_firstblock in reflink cow block cancel

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>
Brian Foster 7 years ago
parent
commit
381d592848
1 changed files with 1 additions and 2 deletions
  1. 1 2
      fs/xfs/xfs_reflink.c

+ 1 - 2
fs/xfs/xfs_reflink.c

@@ -483,7 +483,6 @@ xfs_reflink_cancel_cow_blocks(
 	struct xfs_ifork		*ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK);
 	struct xfs_ifork		*ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK);
 	struct xfs_bmbt_irec		got, del;
 	struct xfs_bmbt_irec		got, del;
 	struct xfs_iext_cursor		icur;
 	struct xfs_iext_cursor		icur;
-	xfs_fsblock_t			firstfsb;
 	struct xfs_defer_ops		dfops;
 	struct xfs_defer_ops		dfops;
 	struct xfs_defer_ops		*odfops = (*tpp)->t_dfops;
 	struct xfs_defer_ops		*odfops = (*tpp)->t_dfops;
 	int				error = 0;
 	int				error = 0;
@@ -512,7 +511,7 @@ xfs_reflink_cancel_cow_blocks(
 			if (error)
 			if (error)
 				break;
 				break;
 		} else if (del.br_state == XFS_EXT_UNWRITTEN || cancel_real) {
 		} else if (del.br_state == XFS_EXT_UNWRITTEN || cancel_real) {
-			xfs_defer_init(*tpp, &dfops, &firstfsb);
+			xfs_defer_init(*tpp, &dfops, &(*tpp)->t_firstblock);
 
 
 			/* Free the CoW orphan record. */
 			/* Free the CoW orphan record. */
 			error = xfs_refcount_free_cow_extent(ip->i_mount,
 			error = xfs_refcount_free_cow_extent(ip->i_mount,