From 175d1a013eaf35c802e0195d87ac2a8df83ad42a Mon Sep 17 00:00:00 2001 From: Brian Foster Date: Wed, 11 Jul 2018 22:26:12 -0700 Subject: xfs: use ->t_dfops for all xfs_bmapi_write() callers Attach ->t_dfops for all remaining callers of xfs_bmapi_write(). This prepares the latter to no longer require a separate dfops parameter. Note that xfs_symlink() already uses ->t_dfops. Fix up the local references for consistency. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- fs/xfs/xfs_reflink.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fs/xfs/xfs_reflink.c') diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index 33845009bec5..3c28e7ff7365 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -429,19 +429,20 @@ retry: xfs_trans_ijoin(tp, ip, 0); xfs_defer_init(&dfops, &first_block); + tp->t_dfops = &dfops; nimaps = 1; /* Allocate the entire reservation as unwritten blocks. */ error = xfs_bmapi_write(tp, ip, imap->br_startoff, imap->br_blockcount, XFS_BMAPI_COWFORK | XFS_BMAPI_PREALLOC, &first_block, - resblks, imap, &nimaps, &dfops); + resblks, imap, &nimaps, tp->t_dfops); if (error) goto out_bmap_cancel; xfs_inode_set_cowblocks_tag(ip); /* Finish up. */ - error = xfs_defer_finish(&tp, &dfops); + error = xfs_defer_finish(&tp, tp->t_dfops); if (error) goto out_bmap_cancel; @@ -458,7 +459,7 @@ retry: convert: return xfs_reflink_convert_cow_extent(ip, imap, offset_fsb, count_fsb); out_bmap_cancel: - xfs_defer_cancel(&dfops); + xfs_defer_cancel(tp->t_dfops); xfs_trans_unreserve_quota_nblks(tp, ip, (long)resblks, 0, XFS_QMOPT_RES_REGBLKS); out: -- cgit v1.2.3