summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2018-07-12 07:26:19 +0200
committerDarrick J. Wong <darrick.wong@oracle.com>2018-07-12 07:26:19 +0200
commitbcd2c9f33559764e0d306e226a8aa88bc2e1e6fb (patch)
tree9fbdeaca5d91293ee5ed2604443893276b3d029e /fs/xfs/xfs_rtalloc.c
parentxfs: use ->t_dfops in reflink cow recover path (diff)
downloadlinux-bcd2c9f33559764e0d306e226a8aa88bc2e1e6fb.tar.xz
linux-bcd2c9f33559764e0d306e226a8aa88bc2e1e6fb.zip
xfs: refactor dfops init to attach to transaction
Most callers of xfs_defer_init() immediately attach the dfops structure to a transaction. Add a transaction parameter to eliminate much of this boilerplate code. This also helps self-document the fact that many codepaths now expect a dfops pointer implicitly via xfs_trans->t_dfops. 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_rtalloc.c')
-rw-r--r--fs/xfs/xfs_rtalloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 1c7d1238ff3b..c102b0d26bc1 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -787,8 +787,7 @@ xfs_growfs_rt_alloc(
xfs_ilock(ip, XFS_ILOCK_EXCL);
xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
- xfs_defer_init(&dfops, &firstblock);
- tp->t_dfops = &dfops;
+ xfs_defer_init(tp, &dfops, &firstblock);
/*
* Allocate blocks to the bitmap file.
*/