imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,57 +1,57 @@
 int xfs_bmapi_remap(struct xfs_trans *tp, struct xfs_inode *ip, xfs_fileoff_t bno, xfs_filblks_t len, xfs_fsblock_t startblock, int flags) {
   struct xfs_mount *mp = ip->i_mount;
   struct xfs_ifork *ifp;
   struct xfs_btree_cur *cur = NULL;
   struct xfs_bmbt_irec got;
   struct xfs_iext_cursor icur;
   int whichfork = xfs_bmapi_whichfork(flags);
   int logflags = 0, error;
   ifp = XFS_IFORK_PTR(ip, whichfork);
   ASSERT(len > 0);
   ASSERT(len <= (xfs_filblks_t)MAXEXTLEN);
   ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
   ASSERT(!(flags & ~(XFS_BMAPI_ATTRFORK | XFS_BMAPI_PREALLOC | XFS_BMAPI_NORMAP)));
   ASSERT((flags & (XFS_BMAPI_ATTRFORK | XFS_BMAPI_PREALLOC)) != (XFS_BMAPI_ATTRFORK | XFS_BMAPI_PREALLOC));
   if (unlikely(XFS_TEST_ERROR((XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_EXTENTS && XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_BTREE), mp, XFS_ERRTAG_BMAPIFORMAT))) {
     XFS_ERROR_REPORT("xfs_bmapi_remap", XFS_ERRLEVEL_LOW, mp);
     return -EFSCORRUPTED;
   }
   if (XFS_FORCED_SHUTDOWN(mp)) return -EIO;
   if (!(ifp->if_flags & XFS_IFEXTENTS)) {
     error = xfs_iread_extents(tp, ip, whichfork);
     if (error) return error;
   }
   if (xfs_iext_lookup_extent(ip, ifp, bno, &icur, &got)) {
     /* make sure we only reflink into a hole. */
     ASSERT(got.br_startoff > bno);
     ASSERT(got.br_startoff - bno >= len);
   }
   ip->i_d.di_nblocks += len;
   xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
   if (ifp->if_flags & XFS_IFBROOT) {
     cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork);
     cur->bc_private.b.flags = 0;
   }
   got.br_startoff = bno;
   got.br_startblock = startblock;
   got.br_blockcount = len;
   if (flags & XFS_BMAPI_PREALLOC)
     got.br_state = XFS_EXT_UNWRITTEN;
   else
     got.br_state = XFS_EXT_NORM;
   error = xfs_bmap_add_extent_hole_real(tp, ip, whichfork, &icur, &cur, &got, &logflags, flags);
   if (error) goto error0;
   if (xfs_bmap_wants_extents(ip, whichfork)) {
     int tmp_logflags = 0;
     error = xfs_bmap_btree_to_extents(tp, ip, cur, &tmp_logflags, whichfork);
     logflags |= tmp_logflags;
   }
 error0:
   if (ip->i_d.di_format != XFS_DINODE_FMT_EXTENTS)
     logflags &= ~XFS_ILOG_DEXT;
   else if (ip->i_d.di_format != XFS_DINODE_FMT_BTREE)
     logflags &= ~XFS_ILOG_DBROOT;
   if (logflags) xfs_trans_log_inode(tp, ip, logflags);
-  if (cur) { xfs_btree_del_cursor(cur, error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR); }
+  if (cur) { xfs_btree_del_cursor(cur, error); }
   return error;
 }<sep>@@
expression e,error;
@@

                xfs_btree_del_cursor(e, 
-                       (error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR)
+			error
		)
--- initial
+++ final
@@ -1,19 +1,19 @@
 STATIC int xfs_getfsmap_is_shared(struct xfs_trans *tp, struct xfs_getfsmap_info *info, struct xfs_rmap_irec *rec, bool *stat) {
   struct xfs_mount *mp = tp->t_mountp;
   struct xfs_btree_cur *cur;
   xfs_agblock_t fbno;
   xfs_extlen_t flen;
   int error;
   *stat = false;
   if (!xfs_sb_version_hasreflink(&mp->m_sb)) return 0;
   /* rt files will have agno set to NULLAGNUMBER */
   if (info->agno == NULLAGNUMBER) return 0;
   /* Are there any shared blocks here? */
   flen = 0;
   cur = xfs_refcountbt_init_cursor(mp, tp, info->agf_bp, info->agno);
   error = xfs_refcount_find_shared(cur, rec->rm_startblock, rec->rm_blockcount, &fbno, &flen, false);
-  xfs_btree_del_cursor(cur, error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR);
+  xfs_btree_del_cursor(cur, error);
   if (error) return error;
   *stat = flen > 0;
   return 0;
 }<sep>@@
expression e,error;
@@

                xfs_btree_del_cursor(e, 
-                       (error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR)
+			error
		)
--- initial
+++ final
@@ -1,12 +1,12 @@
 static int xfs_inobt_count_blocks(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_btnum_t btnum, xfs_extlen_t *tree_blocks) {
   struct xfs_buf *agbp;
   struct xfs_btree_cur *cur;
   int error;
   error = xfs_ialloc_read_agi(mp, NULL, agno, &agbp);
   if (error) return error;
   cur = xfs_inobt_init_cursor(mp, NULL, agbp, agno, btnum);
   error = xfs_btree_count_blocks(cur, tree_blocks);
-  xfs_btree_del_cursor(cur, error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR);
+  xfs_btree_del_cursor(cur, error);
   xfs_buf_relse(agbp);
   return error;
 }<sep>@@
expression e,error;
@@

                xfs_btree_del_cursor(e, 
-                       (error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR)
+			error
		)
--- initial
+++ final
@@ -1,34 +1,34 @@
 STATIC int xfs_imap_lookup(struct xfs_mount *mp, struct xfs_trans *tp, xfs_agnumber_t agno, xfs_agino_t agino, xfs_agblock_t agbno, xfs_agblock_t *chunk_agbno, xfs_agblock_t *offset_agbno, int flags) {
   struct xfs_inobt_rec_incore rec;
   struct xfs_btree_cur *cur;
   struct xfs_buf *agbp;
   int error;
   int i;
   error = xfs_ialloc_read_agi(mp, tp, agno, &agbp);
   if (error) {
     xfs_alert(mp, "%s: xfs_ialloc_read_agi() returned error %d, agno %d", __func__, error, agno);
     return error;
   }
   /*
    * Lookup the inode record for the given agino. If the record cannot be
    * found, then it's an invalid inode number and we should abort. Once
    * we have a record, we need to ensure it contains the inode number
    * we are looking up.
    */
   cur = xfs_inobt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_INO);
   error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &i);
   if (!error) {
     if (i) error = xfs_inobt_get_rec(cur, &rec, &i);
     if (!error && i == 0) error = -EINVAL;
   }
   xfs_trans_brelse(tp, agbp);
-  xfs_btree_del_cursor(cur, error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR);
+  xfs_btree_del_cursor(cur, error);
   if (error) return error;
   /* check that the returned record contains the required inode */
   if (rec.ir_startino > agino || rec.ir_startino + mp->m_ialloc_inos <= agino) return -EINVAL;
   /* for untrusted inodes check it is allocated first */
   if ((flags & XFS_IGET_UNTRUSTED) && (rec.ir_free & XFS_INOBT_MASK(agino - rec.ir_startino))) return -EINVAL;
   *chunk_agbno = XFS_AGINO_TO_AGBNO(mp, rec.ir_startino);
   *offset_agbno = agbno - *chunk_agbno;
   return 0;
 }<sep>@@
expression e,error;
@@

                xfs_btree_del_cursor(e, 
-                       (error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR)
+			error
		)
--- initial
+++ final
@@ -1,70 +1,70 @@
 int                                /* error status */
 xfs_inumbers(struct xfs_mount *mp, /* mount point for filesystem */
              xfs_ino_t *lastino,   /* last inode returned */
              int *count,           /* size of buffer/count returned */
              void __user *ubuffer, /* buffer with inode descriptions */
              inumbers_fmt_pf formatter) {
   xfs_agnumber_t agno = XFS_INO_TO_AGNO(mp, *lastino);
   xfs_agino_t agino = XFS_INO_TO_AGINO(mp, *lastino);
   struct xfs_btree_cur *cur = NULL;
   struct xfs_buf *agbp = NULL;
   struct xfs_inogrp *buffer;
   int bcount;
   int left = *count;
   int bufidx = 0;
   int error = 0;
   *count = 0;
   if (agno >= mp->m_sb.sb_agcount || *lastino != XFS_AGINO_TO_INO(mp, agno, agino)) return error;
   bcount = min(left, (int)(PAGE_SIZE / sizeof(*buffer)));
   buffer = kmem_zalloc(bcount * sizeof(*buffer), KM_SLEEP);
   do {
     struct xfs_inobt_rec_incore r;
     int stat;
     if (!agbp) {
       error = xfs_ialloc_read_agi(mp, NULL, agno, &agbp);
       if (error) break;
       cur = xfs_inobt_init_cursor(mp, NULL, agbp, agno, XFS_BTNUM_INO);
       error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_GE, &stat);
       if (error) break;
       if (!stat) goto next_ag;
     }
     error = xfs_inobt_get_rec(cur, &r, &stat);
     if (error) break;
     if (!stat) goto next_ag;
     agino = r.ir_startino + XFS_INODES_PER_CHUNK - 1;
     buffer[bufidx].xi_startino = XFS_AGINO_TO_INO(mp, agno, r.ir_startino);
     buffer[bufidx].xi_alloccount = r.ir_count - r.ir_freecount;
     buffer[bufidx].xi_allocmask = ~r.ir_free;
     if (++bufidx == bcount) {
       long written;
       error = formatter(ubuffer, buffer, bufidx, &written);
       if (error) break;
       ubuffer += written;
       *count += bufidx;
       bufidx = 0;
     }
     if (!--left) break;
     error = xfs_btree_increment(cur, 0, &stat);
     if (error) break;
     if (stat) continue;
   next_ag:
     xfs_btree_del_cursor(cur, XFS_BTREE_ERROR);
     cur = NULL;
     xfs_buf_relse(agbp);
     agbp = NULL;
     agino = 0;
     agno++;
   } while (agno < mp->m_sb.sb_agcount);
   if (!error) {
     if (bufidx) {
       long written;
       error = formatter(ubuffer, buffer, bufidx, &written);
       if (!error) *count += bufidx;
     }
     *lastino = XFS_AGINO_TO_INO(mp, agno, agino);
   }
   kmem_free(buffer);
-  if (cur) xfs_btree_del_cursor(cur, (error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR));
+  if (cur) xfs_btree_del_cursor(cur, error);
   if (agbp) xfs_buf_relse(agbp);
   return error;
 }<sep>@@
expression e,error;
@@

                xfs_btree_del_cursor(e, 
-                       (error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR)
+			error
		)
--- initial
+++ final
@@ -1,7 +1,7 @@
 void xfs_refcount_finish_one_cleanup(struct xfs_trans *tp, struct xfs_btree_cur *rcur, int error) {
   struct xfs_buf *agbp;
   if (rcur == NULL) return;
   agbp = rcur->bc_private.a.agbp;
-  xfs_btree_del_cursor(rcur, error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR);
+  xfs_btree_del_cursor(rcur, error);
   if (error) xfs_trans_brelse(tp, agbp);
 }<sep>@@
expression e,error;
@@

                xfs_btree_del_cursor(e, 
-                       (error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR)
+			error
		)
--- initial
+++ final
@@ -1,13 +1,13 @@
 int xfs_reflink_find_shared(struct xfs_mount *mp, struct xfs_trans *tp, xfs_agnumber_t agno, xfs_agblock_t agbno, xfs_extlen_t aglen, xfs_agblock_t *fbno, xfs_extlen_t *flen, bool find_end_of_shared) {
   struct xfs_buf *agbp;
   struct xfs_btree_cur *cur;
   int error;
   error = xfs_alloc_read_agf(mp, tp, agno, 0, &agbp);
   if (error) return error;
   if (!agbp) return -ENOMEM;
   cur = xfs_refcountbt_init_cursor(mp, tp, agbp, agno);
   error = xfs_refcount_find_shared(cur, agbno, aglen, fbno, flen, find_end_of_shared);
-  xfs_btree_del_cursor(cur, error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR);
+  xfs_btree_del_cursor(cur, error);
   xfs_trans_brelse(tp, agbp);
   return error;
 }<sep>@@
expression e,error;
@@

                xfs_btree_del_cursor(e, 
-                       (error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR)
+			error
		)
--- initial
+++ final
@@ -1,7 +1,7 @@
 void xfs_rmap_finish_one_cleanup(struct xfs_trans *tp, struct xfs_btree_cur *rcur, int error) {
   struct xfs_buf *agbp;
   if (rcur == NULL) return;
   agbp = rcur->bc_private.a.agbp;
-  xfs_btree_del_cursor(rcur, error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR);
+  xfs_btree_del_cursor(rcur, error);
   if (error) xfs_trans_brelse(tp, agbp);
 }<sep>@@
expression e,error;
@@

                xfs_btree_del_cursor(e, 
-                       (error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR)
+			error
		)
--- initial
+++ final
@@ -1,64 +1,64 @@
 int xfs_attr_rmtval_remove(struct xfs_da_args *args) {
   struct xfs_mount *mp = args->dp->i_mount;
   xfs_dablk_t lblkno;
   int blkcnt;
   int error;
   int done;
   trace_xfs_attr_rmtval_remove(args);
   /*
    * Roll through the "value", invalidating the attribute value's blocks.
    */
   lblkno = args->rmtblkno;
   blkcnt = args->rmtblkcnt;
   while (blkcnt > 0) {
     struct xfs_bmbt_irec map;
     struct xfs_buf *bp;
     xfs_daddr_t dblkno;
     int dblkcnt;
     int nmap;
     /*
      * Try to remember where we decided to put the value.
      */
     nmap = 1;
     error = xfs_bmapi_read(args->dp, (xfs_fileoff_t)lblkno, blkcnt, &map, &nmap, XFS_BMAPI_ATTRFORK);
     if (error) return error;
     ASSERT(nmap == 1);
     ASSERT((map.br_startblock != DELAYSTARTBLOCK) && (map.br_startblock != HOLESTARTBLOCK));
     dblkno = XFS_FSB_TO_DADDR(mp, map.br_startblock), dblkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount);
     /*
      * If the "remote" value is in the cache, remove it.
      */
     bp = xfs_buf_incore(mp->m_ddev_targp, dblkno, dblkcnt, XBF_TRYLOCK);
     if (bp) {
       xfs_buf_stale(bp);
       xfs_buf_relse(bp);
       bp = NULL;
     }
     lblkno += map.br_blockcount;
     blkcnt -= map.br_blockcount;
   }
   /*
    * Keep de-allocating extents until the remote-value region is gone.
    */
   lblkno = args->rmtblkno;
   blkcnt = args->rmtblkcnt;
   done = 0;
   while (!done) {
-    xfs_defer_init(args->trans, args->trans->t_dfops, &args->trans->t_firstblock);
+    xfs_defer_init(args->trans, args->trans->t_dfops);
     error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt, XFS_BMAPI_ATTRFORK, 1, &done);
     if (error) goto out_defer_cancel;
     xfs_defer_ijoin(args->trans->t_dfops, args->dp);
     error = xfs_defer_finish(&args->trans, args->trans->t_dfops);
     if (error) goto out_defer_cancel;
     /*
      * Close out trans and start the next one in the chain.
      */
     error = xfs_trans_roll_inode(&args->trans, args->dp);
     if (error) return error;
   }
   return 0;
 out_defer_cancel:
   xfs_defer_cancel(args->trans->t_dfops);
   args->trans = NULL;
   return error;
 }<sep>@@
expression e1,e2,e3;
@@
  xfs_defer_init(e1,e2
- 		, e3
	)
--- initial
+++ final
@@ -1,35 +1,35 @@
 STATIC int xfs_attr_leaf_removename(struct xfs_da_args *args) {
   struct xfs_inode *dp;
   struct xfs_buf *bp;
   int error, forkoff;
   trace_xfs_attr_leaf_removename(args);
   /*
    * Remove the attribute.
    */
   dp = args->dp;
   args->blkno = 0;
   error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
   if (error) return error;
   error = xfs_attr3_leaf_lookup_int(bp, args);
   if (error == -ENOATTR) {
     xfs_trans_brelse(args->trans, bp);
     return error;
   }
   xfs_attr3_leaf_remove(bp, args);
   /*
    * If the result is small enough, shrink it all into the inode.
    */
   if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) {
-    xfs_defer_init(args->trans, args->trans->t_dfops, &args->trans->t_firstblock);
+    xfs_defer_init(args->trans, args->trans->t_dfops);
     error = xfs_attr3_leaf_to_shortform(bp, args, forkoff);
     /* bp is gone due to xfs_da_shrink_inode */
     if (error) goto out_defer_cancel;
     xfs_defer_ijoin(args->trans->t_dfops, dp);
     error = xfs_defer_finish(&args->trans, args->trans->t_dfops);
     if (error) goto out_defer_cancel;
   }
   return 0;
 out_defer_cancel:
   xfs_defer_cancel(args->trans->t_dfops);
   return error;
 }<sep>@@
expression e1,e2,e3;
@@
  xfs_defer_init(e1,e2
- 		, e3
	)
--- initial
+++ final
@@ -1,59 +1,59 @@
 int xfs_attr_remove(struct xfs_inode *dp, const unsigned char *name, int flags) {
   struct xfs_mount *mp = dp->i_mount;
   struct xfs_da_args args;
   struct xfs_defer_ops dfops;
   int error;
   XFS_STATS_INC(mp, xs_attr_remove);
   if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return -EIO;
   error = xfs_attr_args_init(&args, dp, name, flags);
   if (error) return error;
   /*
    * we have no control over the attribute names that userspace passes us
    * to remove, so we have to allow the name lookup prior to attribute
    * removal to fail.
    */
   args.op_flags = XFS_DA_OP_OKNOENT;
   error = xfs_qm_dqattach(dp);
   if (error) return error;
   /*
    * Root fork attributes can use reserved data blocks for this
    * operation if necessary
    */
   error = xfs_trans_alloc(mp, &M_RES(mp)->tr_attrrm, XFS_ATTRRM_SPACE_RES(mp), 0, (flags & ATTR_ROOT) ? XFS_TRANS_RESERVE : 0, &args.trans);
   if (error) return error;
-  xfs_defer_init(args.trans, &dfops, &args.trans->t_firstblock);
+  xfs_defer_init(args.trans, &dfops);
   xfs_ilock(dp, XFS_ILOCK_EXCL);
   /*
    * No need to make quota reservations here. We expect to release some
    * blocks not allocate in the common case.
    */
   xfs_trans_ijoin(args.trans, dp, 0);
   if (!xfs_inode_hasattr(dp)) {
     error = -ENOATTR;
   } else if (dp->i_d.di_aformat == XFS_DINODE_FMT_LOCAL) {
     ASSERT(dp->i_afp->if_flags & XFS_IFINLINE);
     error = xfs_attr_shortform_remove(&args);
   } else if (xfs_bmap_one_block(dp, XFS_ATTR_FORK)) {
     error = xfs_attr_leaf_removename(&args);
   } else {
     error = xfs_attr_node_removename(&args);
   }
   if (error) goto out;
   /*
    * If this is a synchronous mount, make sure that the
    * transaction goes to disk before returning to the user.
    */
   if (mp->m_flags & XFS_MOUNT_WSYNC) xfs_trans_set_sync(args.trans);
   if ((flags & ATTR_KERNOTIME) == 0) xfs_trans_ichgtime(args.trans, dp, XFS_ICHGTIME_CHG);
   /*
    * Commit the last in the sequence of transactions.
    */
   xfs_trans_log_inode(args.trans, dp, XFS_ILOG_CORE);
   error = xfs_trans_commit(args.trans);
   xfs_iunlock(dp, XFS_ILOCK_EXCL);
   return error;
 out:
   if (args.trans) xfs_trans_cancel(args.trans);
   xfs_iunlock(dp, XFS_ILOCK_EXCL);
   return error;
 }<sep>@@
expression e1,e2,e3;
@@
  xfs_defer_init(e1,e2
- 		, e3
	)
--- initial
+++ final
@@ -1,37 +1,37 @@
 int xfs_collapse_file_space(struct xfs_inode *ip, xfs_off_t offset, xfs_off_t len) {
   struct xfs_mount *mp = ip->i_mount;
   struct xfs_trans *tp;
   int error;
   struct xfs_defer_ops dfops;
   xfs_fileoff_t next_fsb = XFS_B_TO_FSB(mp, offset + len);
   xfs_fileoff_t shift_fsb = XFS_B_TO_FSB(mp, len);
   uint resblks = XFS_DIOSTRAT_SPACE_RES(mp, 0);
   bool done = false;
   ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
   ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
   trace_xfs_collapse_file_space(ip);
   error = xfs_free_file_space(ip, offset, len);
   if (error) return error;
   error = xfs_prepare_shift(ip, offset);
   if (error) return error;
   while (!error && !done) {
     error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, resblks, 0, 0, &tp);
     if (error) break;
     xfs_ilock(ip, XFS_ILOCK_EXCL);
     error = xfs_trans_reserve_quota(tp, mp, ip->i_udquot, ip->i_gdquot, ip->i_pdquot, resblks, 0, XFS_QMOPT_RES_REGBLKS);
     if (error) goto out_trans_cancel;
     xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
-    xfs_defer_init(tp, &dfops, &tp->t_firstblock);
+    xfs_defer_init(tp, &dfops);
     error = xfs_bmap_collapse_extents(tp, ip, &next_fsb, shift_fsb, &done);
     if (error) goto out_bmap_cancel;
     error = xfs_defer_finish(&tp, tp->t_dfops);
     if (error) goto out_bmap_cancel;
     error = xfs_trans_commit(tp);
   }
   return error;
 out_bmap_cancel:
   xfs_defer_cancel(tp->t_dfops);
 out_trans_cancel:
   xfs_trans_cancel(tp);
   return error;
 }<sep>@@
expression e1,e2,e3;
@@
  xfs_defer_init(e1,e2
- 		, e3
	)
--- initial
+++ final
@@ -1,41 +1,41 @@
 int xfs_insert_file_space(struct xfs_inode *ip, loff_t offset, loff_t len) {
   struct xfs_mount *mp = ip->i_mount;
   struct xfs_trans *tp;
   int error;
   struct xfs_defer_ops dfops;
   xfs_fileoff_t stop_fsb = XFS_B_TO_FSB(mp, offset);
   xfs_fileoff_t next_fsb = NULLFSBLOCK;
   xfs_fileoff_t shift_fsb = XFS_B_TO_FSB(mp, len);
   bool done = false;
   ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
   ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
   trace_xfs_insert_file_space(ip);
   error = xfs_bmap_can_insert_extents(ip, stop_fsb, shift_fsb);
   if (error) return error;
   error = xfs_prepare_shift(ip, offset);
   if (error) return error;
   /*
    * The extent shifting code works on extent granularity. So, if stop_fsb
    * is not the starting block of extent, we need to split the extent at
    * stop_fsb.
    */
   error = xfs_bmap_split_extent(ip, stop_fsb);
   if (error) return error;
   while (!error && !done) {
     error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, 0, 0, 0, &tp);
     if (error) break;
     xfs_ilock(ip, XFS_ILOCK_EXCL);
     xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
-    xfs_defer_init(tp, &dfops, &tp->t_firstblock);
+    xfs_defer_init(tp, &dfops);
     error = xfs_bmap_insert_extents(tp, ip, &next_fsb, shift_fsb, &done, stop_fsb);
     if (error) goto out_bmap_cancel;
     error = xfs_defer_finish(&tp, tp->t_dfops);
     if (error) goto out_bmap_cancel;
     error = xfs_trans_commit(tp);
   }
   return error;
 out_bmap_cancel:
   xfs_defer_cancel(tp->t_dfops);
   xfs_trans_cancel(tp);
   return error;
 }<sep>@@
expression e1,e2,e3;
@@
  xfs_defer_init(e1,e2
- 		, e3
	)
--- initial
+++ final
@@ -1,31 +1,31 @@
 static int xfs_unmap_extent(struct xfs_inode *ip, xfs_fileoff_t startoffset_fsb, xfs_filblks_t len_fsb, int *done) {
   struct xfs_mount *mp = ip->i_mount;
   struct xfs_trans *tp;
   struct xfs_defer_ops dfops;
   uint resblks = XFS_DIOSTRAT_SPACE_RES(mp, 0);
   int error;
   error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, resblks, 0, 0, &tp);
   if (error) {
     ASSERT(error == -ENOSPC || XFS_FORCED_SHUTDOWN(mp));
     return error;
   }
   xfs_ilock(ip, XFS_ILOCK_EXCL);
   error = xfs_trans_reserve_quota(tp, mp, ip->i_udquot, ip->i_gdquot, ip->i_pdquot, resblks, 0, XFS_QMOPT_RES_REGBLKS);
   if (error) goto out_trans_cancel;
   xfs_trans_ijoin(tp, ip, 0);
-  xfs_defer_init(tp, &dfops, &tp->t_firstblock);
+  xfs_defer_init(tp, &dfops);
   error = xfs_bunmapi(tp, ip, startoffset_fsb, len_fsb, 0, 2, done);
   if (error) goto out_bmap_cancel;
   xfs_defer_ijoin(tp->t_dfops, ip);
   error = xfs_defer_finish(&tp, tp->t_dfops);
   if (error) goto out_bmap_cancel;
   error = xfs_trans_commit(tp);
 out_unlock:
   xfs_iunlock(ip, XFS_ILOCK_EXCL);
   return error;
 out_bmap_cancel:
   xfs_defer_cancel(tp->t_dfops);
 out_trans_cancel:
   xfs_trans_cancel(tp);
   goto out_unlock;
 }<sep>@@
expression e1,e2,e3;
@@
  xfs_defer_init(e1,e2
- 		, e3
	)
--- initial
+++ final
@@ -1,20 +1,20 @@
 int xfs_bmap_split_extent(struct xfs_inode *ip, xfs_fileoff_t split_fsb) {
   struct xfs_mount *mp = ip->i_mount;
   struct xfs_trans *tp;
   struct xfs_defer_ops dfops;
   int error;
   error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, XFS_DIOSTRAT_SPACE_RES(mp, 0), 0, 0, &tp);
   if (error) return error;
-  xfs_defer_init(tp, &dfops, &tp->t_firstblock);
+  xfs_defer_init(tp, &dfops);
   xfs_ilock(ip, XFS_ILOCK_EXCL);
   xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
   error = xfs_bmap_split_extent_at(tp, ip, split_fsb);
   if (error) goto out;
   error = xfs_defer_finish(&tp, &dfops);
   if (error) goto out;
   return xfs_trans_commit(tp);
 out:
   xfs_defer_cancel(&dfops);
   xfs_trans_cancel(tp);
   return error;
 }<sep>@@
expression e1,e2,e3;
@@
  xfs_defer_init(e1,e2
- 		, e3
	)
--- initial
+++ final
@@ -1,26 +1,26 @@
 static int xfs_qm_dqread_alloc(struct xfs_mount *mp, struct xfs_dquot *dqp, struct xfs_buf **bpp) {
   struct xfs_trans *tp;
   struct xfs_defer_ops dfops;
   struct xfs_buf *bp;
   int error;
   error = xfs_trans_alloc(mp, &M_RES(mp)->tr_qm_dqalloc, 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) goto err_cancel;
   error = xfs_trans_commit(tp);
   if (error) {
     /*
      * Buffer was held to the transaction, so we have to unlock it
      * manually here because we're not passing it back.
      */
     xfs_buf_relse(bp);
     goto err;
   }
   *bpp = bp;
   return 0;
 err_cancel:
   xfs_trans_cancel(tp);
 err:
   return error;
 }<sep>@@
expression e1,e2,e3;
@@
  xfs_defer_init(e1,e2
- 		, e3
	)