--- initial
+++ final
@@ -1,86 +1,86 @@
 int xfs_iomap_write_unwritten(xfs_inode_t *ip, xfs_off_t offset, xfs_off_t count, bool update_isize) {
   xfs_mount_t *mp = ip->i_mount;
   xfs_fileoff_t offset_fsb;
   xfs_filblks_t count_fsb;
   xfs_filblks_t numblks_fsb;
   int nimaps;
   xfs_trans_t *tp;
   xfs_bmbt_irec_t imap;
   struct xfs_defer_ops dfops;
   struct inode *inode = VFS_I(ip);
   xfs_fsize_t i_size;
   uint resblks;
   int error;
   trace_xfs_unwritten_convert(ip, offset, count);
   offset_fsb = XFS_B_TO_FSBT(mp, offset);
   count_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + count);
   count_fsb = (xfs_filblks_t)(count_fsb - offset_fsb);
   /*
    * Reserve enough blocks in this transaction for two complete extent
    * btree splits.  We may be converting the middle part of an unwritten
    * extent and in this case we will insert two new extents in the btree
    * each of which could cause a full split.
    *
    * This reservation amount will be used in the first call to
    * xfs_bmbt_split() to select an AG with enough space to satisfy the
    * rest of the operation.
    */
   resblks = XFS_DIOSTRAT_SPACE_RES(mp, 0) << 1;
   do {
     /*
      * Set up a transaction to convert the range of extents
      * from unwritten to real. Do allocations in a loop until
      * we have covered the range passed in.
      *
      * Note that we can't risk to recursing back into the filesystem
      * here as we might be asked to write out the same inode that we
      * complete here and might deadlock on the iolock.
      */
     error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, resblks, 0, XFS_TRANS_RESERVE | XFS_TRANS_NOFS, &tp);
     if (error) return error;
     xfs_ilock(ip, XFS_ILOCK_EXCL);
     xfs_trans_ijoin(tp, ip, 0);
     /*
      * Modify the unwritten extent state of the buffer.
      */
-    xfs_defer_init(tp, &dfops, &tp->t_firstblock);
+    xfs_defer_init(tp, &dfops);
     nimaps = 1;
     error = xfs_bmapi_write(tp, ip, offset_fsb, count_fsb, XFS_BMAPI_CONVERT, resblks, &imap, &nimaps);
     if (error) goto error_on_bmapi_transaction;
     /*
      * Log the updated inode size as we go.  We have to be careful
      * to only log it up to the actual write offset if it is
      * halfway into a block.
      */
     i_size = XFS_FSB_TO_B(mp, offset_fsb + count_fsb);
     if (i_size > offset + count) i_size = offset + count;
     if (update_isize && i_size > i_size_read(inode)) i_size_write(inode, i_size);
     i_size = xfs_new_eof(ip, i_size);
     if (i_size) {
       ip->i_d.di_size = i_size;
       xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
     }
     error = xfs_defer_finish(&tp, tp->t_dfops);
     if (error) goto error_on_bmapi_transaction;
     error = xfs_trans_commit(tp);
     xfs_iunlock(ip, XFS_ILOCK_EXCL);
     if (error) return error;
     if (!(imap.br_startblock || XFS_IS_REALTIME_INODE(ip))) return xfs_alert_fsblock_zero(ip, &imap);
     if ((numblks_fsb = imap.br_blockcount) == 0) {
       /*
        * The numblks_fsb value should always get
        * smaller, otherwise the loop is stuck.
        */
       ASSERT(imap.br_blockcount);
       break;
     }
     offset_fsb += numblks_fsb;
     count_fsb -= numblks_fsb;
   } while (count_fsb > 0);
   return 0;
 error_on_bmapi_transaction:
   xfs_defer_cancel(tp->t_dfops);
   xfs_trans_cancel(tp);
   xfs_iunlock(ip, XFS_ILOCK_EXCL);
   return error;
 }<sep>@@
expression e1,e2,e3;
@@
  xfs_defer_init(e1,e2
- 		, e3
	)