diff options
author | Brian Foster <bfoster@redhat.com> | 2018-07-12 01:26:12 -0400 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-12 01:26:12 -0400 |
commit | 175d1a013eaf35c802e0195d87ac2a8df83ad42a (patch) | |
tree | 5fd17f0274e814625104eadc3dda30f9ace6fdb3 /fs/xfs/xfs_reflink.c | |
parent | 2ba13721257e2c76e90e8d83dfd9ba91c434355d (diff) |
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 <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/xfs_reflink.c')
-rw-r--r-- | fs/xfs/xfs_reflink.c | 7 |
1 files changed, 4 insertions, 3 deletions
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: | |||
429 | xfs_trans_ijoin(tp, ip, 0); | 429 | xfs_trans_ijoin(tp, ip, 0); |
430 | 430 | ||
431 | xfs_defer_init(&dfops, &first_block); | 431 | xfs_defer_init(&dfops, &first_block); |
432 | tp->t_dfops = &dfops; | ||
432 | nimaps = 1; | 433 | nimaps = 1; |
433 | 434 | ||
434 | /* Allocate the entire reservation as unwritten blocks. */ | 435 | /* Allocate the entire reservation as unwritten blocks. */ |
435 | error = xfs_bmapi_write(tp, ip, imap->br_startoff, imap->br_blockcount, | 436 | error = xfs_bmapi_write(tp, ip, imap->br_startoff, imap->br_blockcount, |
436 | XFS_BMAPI_COWFORK | XFS_BMAPI_PREALLOC, &first_block, | 437 | XFS_BMAPI_COWFORK | XFS_BMAPI_PREALLOC, &first_block, |
437 | resblks, imap, &nimaps, &dfops); | 438 | resblks, imap, &nimaps, tp->t_dfops); |
438 | if (error) | 439 | if (error) |
439 | goto out_bmap_cancel; | 440 | goto out_bmap_cancel; |
440 | 441 | ||
441 | xfs_inode_set_cowblocks_tag(ip); | 442 | xfs_inode_set_cowblocks_tag(ip); |
442 | 443 | ||
443 | /* Finish up. */ | 444 | /* Finish up. */ |
444 | error = xfs_defer_finish(&tp, &dfops); | 445 | error = xfs_defer_finish(&tp, tp->t_dfops); |
445 | if (error) | 446 | if (error) |
446 | goto out_bmap_cancel; | 447 | goto out_bmap_cancel; |
447 | 448 | ||
@@ -458,7 +459,7 @@ retry: | |||
458 | convert: | 459 | convert: |
459 | return xfs_reflink_convert_cow_extent(ip, imap, offset_fsb, count_fsb); | 460 | return xfs_reflink_convert_cow_extent(ip, imap, offset_fsb, count_fsb); |
460 | out_bmap_cancel: | 461 | out_bmap_cancel: |
461 | xfs_defer_cancel(&dfops); | 462 | xfs_defer_cancel(tp->t_dfops); |
462 | xfs_trans_unreserve_quota_nblks(tp, ip, (long)resblks, 0, | 463 | xfs_trans_unreserve_quota_nblks(tp, ip, (long)resblks, 0, |
463 | XFS_QMOPT_RES_REGBLKS); | 464 | XFS_QMOPT_RES_REGBLKS); |
464 | out: | 465 | out: |