summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dquot.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2018-07-11 22:26:33 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-07-11 22:26:33 -0700
commit5fdd97944ee5ae0fcdd88227224d0c2c87aa6db9 (patch)
treea0591072c0a52ff66ce245c008ad6547ff7708f8 /fs/xfs/xfs_dquot.c
parent9c3bf5da80efc1d502c7ef55ea5b77628e341510 (diff)
downloadlinux-5fdd97944ee5ae0fcdd88227224d0c2c87aa6db9.tar.bz2
xfs: remove xfs_defer_init() firstblock param
All but one caller of xfs_defer_init() passes in the ->t_firstblock of the associated transaction. The one outlier is xlog_recover_process_intents(), which simply passes a dummy value because a valid pointer is required. This firstblock variable can simply be removed. At this point we could remove the xfs_defer_init() firstblock parameter and initialize ->t_firstblock directly. Even that is not necessary, however, because ->t_firstblock is automatically reinitialized in the new transaction on a transaction roll. Since xfs_defer_init() should never occur more than once on a particular transaction (since the corresponding finish will roll it), replace the reinit from xfs_defer_init() with an assert that verifies the transaction has a NULLFSBLOCK firstblock. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index 3b61b4d266b4..c53de34c9ae5 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -295,7 +295,7 @@ xfs_dquot_disk_alloc(
trace_xfs_dqalloc(dqp);
- xfs_defer_init(tp, tp->t_dfops, &tp->t_firstblock);
+ xfs_defer_init(tp, tp->t_dfops);
xfs_ilock(quotip, XFS_ILOCK_EXCL);
if (!xfs_this_quota_on(dqp->q_mount, dqp->dq_flags)) {
@@ -546,7 +546,7 @@ xfs_qm_dqread_alloc(
XFS_QM_DQALLOC_SPACE_RES(mp), 0, 0, &tp);
if (error)
goto err;
- xfs_defer_init(tp, &dfops, &tp->t_firstblock);
+ xfs_defer_init(tp, &dfops);
error = xfs_dquot_disk_alloc(&tp, dqp, &bp);
if (error)