summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dquot.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_dquot.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_dquot.c')
-rw-r--r--fs/xfs/xfs_dquot.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index 1ef38e1df679..c698e7f6f744 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -296,7 +296,7 @@ xfs_dquot_disk_alloc(
trace_xfs_dqalloc(dqp);
- xfs_defer_init(tp->t_dfops, &firstblock);
+ xfs_defer_init(tp, tp->t_dfops, &firstblock);
xfs_ilock(quotip, XFS_ILOCK_EXCL);
if (!xfs_this_quota_on(dqp->q_mount, dqp->dq_flags)) {
@@ -549,8 +549,7 @@ xfs_qm_dqread_alloc(
XFS_QM_DQALLOC_SPACE_RES(mp), 0, 0, &tp);
if (error)
goto err;
- xfs_defer_init(&dfops, &firstblock);
- tp->t_dfops = &dfops;
+ xfs_defer_init(tp, &dfops, &firstblock);
error = xfs_dquot_disk_alloc(&tp, dqp, &bp);
if (error)