--- initial
+++ final
@@ -1,85 +1,85 @@
 STATIC int xfs_dquot_disk_alloc(struct xfs_trans **tpp, struct xfs_dquot *dqp, struct xfs_buf **bpp) {
   struct xfs_bmbt_irec map;
   struct xfs_trans *tp = *tpp;
   struct xfs_mount *mp = tp->t_mountp;
   struct xfs_buf *bp;
   struct xfs_inode *quotip = xfs_quota_inode(mp, dqp->dq_flags);
   int nmaps = 1;
   int error;
   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)) {
     /*
      * Return if this type of quotas is turned off while we didn't
      * have an inode lock
      */
     xfs_iunlock(quotip, XFS_ILOCK_EXCL);
     return -ESRCH;
   }
   /* Create the block mapping. */
   xfs_trans_ijoin(tp, quotip, XFS_ILOCK_EXCL);
   error = xfs_bmapi_write(tp, quotip, dqp->q_fileoffset, XFS_DQUOT_CLUSTER_SIZE_FSB, XFS_BMAPI_METADATA, XFS_QM_DQALLOC_SPACE_RES(mp), &map, &nmaps);
   if (error) goto error0;
   ASSERT(map.br_blockcount == XFS_DQUOT_CLUSTER_SIZE_FSB);
   ASSERT(nmaps == 1);
   ASSERT((map.br_startblock != DELAYSTARTBLOCK) && (map.br_startblock != HOLESTARTBLOCK));
   /*
    * Keep track of the blkno to save a lookup later
    */
   dqp->q_blkno = XFS_FSB_TO_DADDR(mp, map.br_startblock);
   /* now we can just get the buffer (there's nothing to read yet) */
   bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, dqp->q_blkno, mp->m_quotainfo->qi_dqchunklen, 0);
   if (!bp) {
     error = -ENOMEM;
     goto error1;
   }
   bp->b_ops = &xfs_dquot_buf_ops;
   /*
    * Make a chunk of dquots out of this buffer and log
    * the entire thing.
    */
   xfs_qm_init_dquot_blk(tp, mp, be32_to_cpu(dqp->q_core.d_id), dqp->dq_flags & XFS_DQ_ALLTYPES, bp);
   xfs_buf_set_ref(bp, XFS_DQUOT_REF);
   /*
    * Hold the buffer and join it to the dfops so that we'll still own
    * the buffer when we return to the caller.  The buffer disposal on
    * error must be paid attention to very carefully, as it has been
    * broken since commit efa092f3d4c6 "[XFS] Fixes a bug in the quota
    * code when allocating a new dquot record" in 2005, and the later
    * conversion to xfs_defer_ops in commit 310a75a3c6c747 failed to keep
    * the buffer locked across the _defer_finish call.  We can now do
    * this correctly with xfs_defer_bjoin.
    *
    * Above, we allocated a disk block for the dquot information and
    * used get_buf to initialize the dquot.  If the _defer_bjoin fails,
    * the buffer is still locked to *tpp, so we must _bhold_release and
    * then _trans_brelse the buffer.  If the _defer_finish fails, the old
    * transaction is gone but the new buffer is not joined or held to any
    * transaction, so we must _buf_relse it.
    *
    * If everything succeeds, the caller of this function is returned a
    * buffer that is locked and held to the transaction.  The caller
    * is responsible for unlocking any buffer passed back, either
    * manually or by committing the transaction.
    */
   xfs_trans_bhold(tp, bp);
   error = xfs_defer_bjoin(tp->t_dfops, bp);
   if (error) {
     xfs_trans_bhold_release(tp, bp);
     xfs_trans_brelse(tp, bp);
     goto error1;
   }
   error = xfs_defer_finish(tpp, tp->t_dfops);
   tp = *tpp;
   if (error) {
     xfs_buf_relse(bp);
     goto error1;
   }
   *bpp = bp;
   return 0;
 error1:
   xfs_defer_cancel(tp->t_dfops);
 error0:
   return error;
 }<sep>@@
expression e1,e2,e3;
@@
  xfs_defer_init(e1,e2
- 		, e3
	)