aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorBrian Foster <[email protected]>2018-07-12 05:26:12 +0000
committerDarrick J. Wong <[email protected]>2018-07-12 05:26:12 +0000
commit175d1a013eaf35c802e0195d87ac2a8df83ad42a (patch)
tree5fd17f0274e814625104eadc3dda30f9ace6fdb3 /fs/xfs/xfs_rtalloc.c
parentxfs: use ->t_dfops in dqalloc transaction (diff)
downloadkernel-175d1a013eaf35c802e0195d87ac2a8df83ad42a.tar.gz
kernel-175d1a013eaf35c802e0195d87ac2a8df83ad42a.zip
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 <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r--fs/xfs/xfs_rtalloc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 329d4d26c13e..312d410d91fb 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -788,13 +788,14 @@ xfs_growfs_rt_alloc(
xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
xfs_defer_init(&dfops, &firstblock);
+ tp->t_dfops = &dfops;
/*
* Allocate blocks to the bitmap file.
*/
nmap = 1;
error = xfs_bmapi_write(tp, ip, oblocks, nblocks - oblocks,
XFS_BMAPI_METADATA, &firstblock,
- resblks, &map, &nmap, &dfops);
+ resblks, &map, &nmap, tp->t_dfops);
if (!error && nmap < 1)
error = -ENOSPC;
if (error)
@@ -802,7 +803,7 @@ xfs_growfs_rt_alloc(
/*
* Free any blocks freed up in the transaction, then commit.
*/
- error = xfs_defer_finish(&tp, &dfops);
+ error = xfs_defer_finish(&tp, tp->t_dfops);
if (error)
goto out_bmap_cancel;
error = xfs_trans_commit(tp);
@@ -855,7 +856,7 @@ xfs_growfs_rt_alloc(
return 0;
out_bmap_cancel:
- xfs_defer_cancel(&dfops);
+ xfs_defer_cancel(tp->t_dfops);
out_trans_cancel:
xfs_trans_cancel(tp);
return error;