]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove xfs_defer_init() firstblock param
authorBrian Foster <bfoster@redhat.com>
Fri, 5 Oct 2018 02:36:09 +0000 (21:36 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 5 Oct 2018 02:36:09 +0000 (21:36 -0500)
Source kernel commit: 5fdd97944ee5ae0fcdd88227224d0c2c87aa6db9

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/util.c
libxfs/xfs_attr.c
libxfs/xfs_attr_remote.c
libxfs/xfs_bmap.c
libxfs/xfs_defer.c
libxfs/xfs_defer.h
libxfs/xfs_refcount.c
mkfs/proto.c
repair/phase6.c

index 33f531a4b3a5ac925ae732d15a960745e0982e72..6f73a77ad4baf6ae66e5482845fa4b5e93d79a05 100644 (file)
@@ -543,7 +543,6 @@ libxfs_alloc_file_space(
        xfs_filblks_t   datablocks;
        xfs_filblks_t   allocated_fsb;
        xfs_filblks_t   allocatesize_fsb;
-       xfs_fsblock_t   firstfsb;
        struct xfs_defer_ops free_list;
        xfs_bmbt_irec_t *imapp;
        xfs_bmbt_irec_t imaps[1];
@@ -582,7 +581,7 @@ libxfs_alloc_file_space(
                }
                xfs_trans_ijoin(tp, ip, 0);
 
-               xfs_defer_init(NULL, &free_list, &firstfsb);
+               xfs_defer_init(NULL, &free_list);
                error = xfs_bmapi_write(tp, ip, startoffset_fsb, allocatesize_fsb,
                                xfs_bmapi_flags, 0, imapp, &reccount);
 
index 2b6e0cf33d872b65daf1721b25479f7c64047599..2cce9e386abb2bb555189ae9d060c3f17b28c83a 100644 (file)
@@ -246,7 +246,7 @@ xfs_attr_set(
                        rsvd ? 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);
        error = xfs_trans_reserve_quota_nblks(args.trans, dp, args.total, 0,
@@ -417,7 +417,7 @@ xfs_attr_remove(
                        &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);
        /*
@@ -588,8 +588,7 @@ xfs_attr_leaf_addname(
                 * Commit that transaction so that the node_addname() call
                 * can manage its own transactions.
                 */
-               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_node(args);
                if (error)
                        goto out_defer_cancel;
@@ -678,8 +677,7 @@ xfs_attr_leaf_addname(
                 * 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)
@@ -744,8 +742,7 @@ xfs_attr_leaf_removename(
         * 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)
@@ -874,8 +871,7 @@ restart:
                         */
                        xfs_da_state_free(state);
                        state = NULL;
-                       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_node(args);
                        if (error)
                                goto out_defer_cancel;
@@ -902,8 +898,7 @@ restart:
                 * in the index/blkno/rmtblkno/rmtblkcnt fields and
                 * in the index2/blkno2/rmtblkno2/rmtblkcnt2 fields.
                 */
-               xfs_defer_init(args->trans, args->trans->t_dfops,
-                              &args->trans->t_firstblock);
+               xfs_defer_init(args->trans, args->trans->t_dfops);
                error = xfs_da3_split(state);
                if (error)
                        goto out_defer_cancel;
@@ -1001,8 +996,7 @@ restart:
                 * Check to see if the tree needs to be collapsed.
                 */
                if (retval && (state->path.active > 1)) {
-                       xfs_defer_init(args->trans, args->trans->t_dfops,
-                                      &args->trans->t_firstblock);
+                       xfs_defer_init(args->trans, args->trans->t_dfops);
                        error = xfs_da3_join(state);
                        if (error)
                                goto out_defer_cancel;
@@ -1127,8 +1121,7 @@ xfs_attr_node_removename(
         * Check to see if the tree needs to be collapsed.
         */
        if (retval && (state->path.active > 1)) {
-               xfs_defer_init(args->trans, args->trans->t_dfops,
-                              &args->trans->t_firstblock);
+               xfs_defer_init(args->trans, args->trans->t_dfops);
                error = xfs_da3_join(state);
                if (error)
                        goto out_defer_cancel;
@@ -1160,8 +1153,7 @@ xfs_attr_node_removename(
                        goto out;
 
                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)
index d6ac356e8d8ebfcc3e591c51f24664fb09fa5f53..5841ac3a65dc4be97100c28bd9e7b703946aca3e 100644 (file)
@@ -475,8 +475,7 @@ xfs_attr_rmtval_set(
                 * extent and then crash then the block may not contain the
                 * correct metadata after log recovery occurs.
                 */
-               xfs_defer_init(args->trans, args->trans->t_dfops,
-                              &args->trans->t_firstblock);
+               xfs_defer_init(args->trans, args->trans->t_dfops);
                nmap = 1;
                error = xfs_bmapi_write(args->trans, dp, (xfs_fileoff_t)lblkno,
                                  blkcnt, XFS_BMAPI_ATTRFORK, args->total, &map,
@@ -518,8 +517,7 @@ xfs_attr_rmtval_set(
 
                ASSERT(blkcnt > 0);
 
-               xfs_defer_init(args->trans, args->trans->t_dfops,
-                              &args->trans->t_firstblock);
+               xfs_defer_init(args->trans, args->trans->t_dfops);
                nmap = 1;
                error = xfs_bmapi_read(dp, (xfs_fileoff_t)lblkno,
                                       blkcnt, &map, &nmap,
@@ -623,8 +621,7 @@ xfs_attr_rmtval_remove(
        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)
index 2934c54de551208cbf93b5812825291cf9dcb5fc..d2c6e58b3142eef35412539dc4fd02ae735d6a13 100644 (file)
@@ -1029,7 +1029,7 @@ xfs_bmap_add_attrfork(
                        rsvd ? XFS_TRANS_RESERVE : 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);
        error = xfs_trans_reserve_quota_nblks(tp, ip, blks, 0, rsvd ?
@@ -5959,7 +5959,7 @@ xfs_bmap_split_extent(
                        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);
index 3ddb58e9df3623987c23d339e19cf7e14900a625..ce5d216d2ef91f3b2821156c309cbbd27e3ba079 100644 (file)
@@ -524,16 +524,15 @@ xfs_defer_init_op_type(
 void
 xfs_defer_init(
        struct xfs_trans                *tp,
-       struct xfs_defer_ops            *dop,
-       xfs_fsblock_t                   *fbp)
+       struct xfs_defer_ops            *dop)
 {
        struct xfs_mount                *mp = NULL;
 
        memset(dop, 0, sizeof(struct xfs_defer_ops));
-       *fbp = NULLFSBLOCK;
        INIT_LIST_HEAD(&dop->dop_intake);
        INIT_LIST_HEAD(&dop->dop_pending);
        if (tp) {
+               ASSERT(tp->t_firstblock == NULLFSBLOCK);
                tp->t_dfops = dop;
                mp = tp->t_mountp;
        }
index 56eaaac31df558245089e00a7bf1a3ec080f274a..c17c9deda99596b24ef4c49ae081c637637a8095 100644 (file)
@@ -63,8 +63,7 @@ void xfs_defer_add(struct xfs_defer_ops *dop, enum xfs_defer_ops_type type,
                struct list_head *h);
 int xfs_defer_finish(struct xfs_trans **tp, struct xfs_defer_ops *dop);
 void xfs_defer_cancel(struct xfs_defer_ops *dop);
-void xfs_defer_init(struct xfs_trans *tp, struct xfs_defer_ops *dop,
-                   xfs_fsblock_t *fbp);
+void xfs_defer_init(struct xfs_trans *tp, struct xfs_defer_ops *dop);
 bool xfs_defer_has_unfinished_work(struct xfs_defer_ops *dop);
 int xfs_defer_ijoin(struct xfs_defer_ops *dop, struct xfs_inode *ip);
 int xfs_defer_bjoin(struct xfs_defer_ops *dop, struct xfs_buf *bp);
index 2cacb95bc7ef13e085007061d2a67bd4183f3392..b21003e15ca0aebc17ed4318b1c3382e57764df8 100644 (file)
@@ -1690,7 +1690,7 @@ xfs_refcount_recover_cow_leftovers(
                trace_xfs_refcount_recover_extent(mp, agno, &rr->rr_rrec);
 
                /* Free the orphan record */
-               xfs_defer_init(tp, &dfops, &tp->t_firstblock);
+               xfs_defer_init(tp, &dfops);
                agbno = rr->rr_rrec.rc_startblock - XFS_REFC_COW_START;
                fsb = XFS_AGB_TO_FSB(mp, agno, agbno);
                error = xfs_refcount_free_cow_extent(mp, tp->t_dfops, fsb,
index dbac6d39834e38ec56bdfd4e596feb624a5a0341..9b63a3286057c62b76a51a3d1fc7d66f4df490ed 100644 (file)
@@ -350,7 +350,6 @@ parseproto(
 
        char            *buf;
        int             error;
-       xfs_fsblock_t   first;
        int             flags;
        struct xfs_defer_ops    dfops;
        int             fmt;
@@ -441,7 +440,7 @@ parseproto(
        case IF_REGULAR:
                buf = newregfile(pp, &len);
                tp = getres(mp, XFS_B_TO_FSB(mp, len));
-               libxfs_defer_init(tp, &dfops, &first);
+               libxfs_defer_init(tp, &dfops);
                error = -libxfs_inode_alloc(&tp, pip, mode|S_IFREG, 1, 0,
                                           &creds, fsxp, &ip);
                if (error)
@@ -465,7 +464,7 @@ parseproto(
                        exit(1);
                }
                tp = getres(mp, XFS_B_TO_FSB(mp, llen));
-               libxfs_defer_init(tp, &dfops, &first);
+               libxfs_defer_init(tp, &dfops);
 
                error = -libxfs_inode_alloc(&tp, pip, mode|S_IFREG, 1, 0,
                                          &creds, fsxp, &ip);
@@ -489,7 +488,7 @@ parseproto(
 
        case IF_BLOCK:
                tp = getres(mp, 0);
-               libxfs_defer_init(tp, &dfops, &first);
+               libxfs_defer_init(tp, &dfops);
                majdev = getnum(getstr(pp), 0, 0, false);
                mindev = getnum(getstr(pp), 0, 0, false);
                error = -libxfs_inode_alloc(&tp, pip, mode|S_IFBLK, 1,
@@ -505,7 +504,7 @@ parseproto(
 
        case IF_CHAR:
                tp = getres(mp, 0);
-               libxfs_defer_init(tp, &dfops, &first);
+               libxfs_defer_init(tp, &dfops);
                majdev = getnum(getstr(pp), 0, 0, false);
                mindev = getnum(getstr(pp), 0, 0, false);
                error = -libxfs_inode_alloc(&tp, pip, mode|S_IFCHR, 1,
@@ -520,7 +519,7 @@ parseproto(
 
        case IF_FIFO:
                tp = getres(mp, 0);
-               libxfs_defer_init(tp, &dfops, &first);
+               libxfs_defer_init(tp, &dfops);
                error = -libxfs_inode_alloc(&tp, pip, mode|S_IFIFO, 1, 0,
                                &creds, fsxp, &ip);
                if (error)
@@ -533,7 +532,7 @@ parseproto(
                buf = getstr(pp);
                len = (int)strlen(buf);
                tp = getres(mp, XFS_B_TO_FSB(mp, len));
-               libxfs_defer_init(tp, &dfops, &first);
+               libxfs_defer_init(tp, &dfops);
                error = -libxfs_inode_alloc(&tp, pip, mode|S_IFLNK, 1, 0,
                                &creds, fsxp, &ip);
                if (error)
@@ -545,7 +544,7 @@ parseproto(
                break;
        case IF_DIRECTORY:
                tp = getres(mp, 0);
-               libxfs_defer_init(tp, &dfops, &first);
+               libxfs_defer_init(tp, &dfops);
                error = -libxfs_inode_alloc(&tp, pip, mode|S_IFDIR, 1, 0,
                                &creds, fsxp, &ip);
                if (error)
@@ -622,7 +621,6 @@ rtinit(
        xfs_fileoff_t   ebno;
        xfs_bmbt_irec_t *ep;
        int             error;
-       xfs_fsblock_t   first;
        struct xfs_defer_ops    dfops;
        int             i;
        xfs_bmbt_irec_t map[XFS_BMAP_MAX_NMAP];
@@ -683,7 +681,7 @@ rtinit(
 
        libxfs_trans_ijoin(tp, rbmip, 0);
        bno = 0;
-       libxfs_defer_init(tp, &dfops, &first);
+       libxfs_defer_init(tp, &dfops);
        while (bno < mp->m_sb.sb_rbmblocks) {
                nmap = XFS_BMAP_MAX_NMAP;
                error = -libxfs_bmapi_write(tp, rbmip, bno,
@@ -718,7 +716,7 @@ rtinit(
                res_failed(i);
        libxfs_trans_ijoin(tp, rsumip, 0);
        bno = 0;
-       libxfs_defer_init(tp, &dfops, &first);
+       libxfs_defer_init(tp, &dfops);
        while (bno < nsumblocks) {
                nmap = XFS_BMAP_MAX_NMAP;
                error = -libxfs_bmapi_write(tp, rsumip, bno,
@@ -752,7 +750,7 @@ rtinit(
                if (i)
                        res_failed(i);
                libxfs_trans_ijoin(tp, rbmip, 0);
-               libxfs_defer_init(tp, &dfops, &first);
+               libxfs_defer_init(tp, &dfops);
                ebno = XFS_RTMIN(mp->m_sb.sb_rextents,
                        bno + NBBY * mp->m_sb.sb_blocksize);
                error = -libxfs_rtfree_extent(tp, bno, (xfs_extlen_t)(ebno-bno));
index 550f6892ffc76ffcbbd158f3b25aeb73944c70b5..c4228a6f882af378d759f21a6df8a746fa37dbdd 100644 (file)
@@ -519,7 +519,6 @@ mk_rbmino(xfs_mount_t *mp)
        xfs_trans_t     *tp;
        xfs_inode_t     *ip;
        xfs_bmbt_irec_t *ep;
-       xfs_fsblock_t   first;
        int             i;
        int             nmap;
        int             error;
@@ -589,7 +588,7 @@ mk_rbmino(xfs_mount_t *mp)
 
        libxfs_trans_ijoin(tp, ip, 0);
        bno = 0;
-       libxfs_defer_init(tp, &dfops, &first);
+       libxfs_defer_init(tp, &dfops);
        while (bno < mp->m_sb.sb_rbmblocks) {
                nmap = XFS_BMAP_MAX_NMAP;
                error = -libxfs_bmapi_write(tp, ip, bno,
@@ -757,7 +756,6 @@ mk_rsumino(xfs_mount_t *mp)
        xfs_trans_t     *tp;
        xfs_inode_t     *ip;
        xfs_bmbt_irec_t *ep;
-       xfs_fsblock_t   first;
        int             i;
        int             nmap;
        int             error;
@@ -828,7 +826,7 @@ mk_rsumino(xfs_mount_t *mp)
 
        libxfs_trans_ijoin(tp, ip, 0);
        bno = 0;
-       libxfs_defer_init(tp, &dfops, &first);
+       libxfs_defer_init(tp, &dfops);
        while (bno < nsumblocks) {
                nmap = XFS_BMAP_MAX_NMAP;
                error = -libxfs_bmapi_write(tp, ip, bno,
@@ -939,7 +937,6 @@ mk_orphanage(xfs_mount_t *mp)
        xfs_trans_t     *tp;
        xfs_inode_t     *ip;
        xfs_inode_t     *pip;
-       xfs_fsblock_t   first;
        ino_tree_node_t *irec;
        int             ino_offset = 0;
        int             i;
@@ -975,7 +972,7 @@ mk_orphanage(xfs_mount_t *mp)
        i = -libxfs_trans_alloc(mp, &M_RES(mp)->tr_mkdir, nres, 0, 0, &tp);
        if (i)
                res_failed(i);
-       libxfs_defer_init(tp, &dfops, &first);
+       libxfs_defer_init(tp, &dfops);
 
        /*
         * use iget/ijoin instead of trans_iget because the ialloc
@@ -1083,8 +1080,7 @@ mv_orphanage(
        xfs_ino_t               entry_ino_num;
        xfs_inode_t             *ino_p;
        xfs_trans_t             *tp;
-       xfs_fsblock_t           first;
-       struct xfs_defer_ops            dfops;
+       struct xfs_defer_ops    dfops;
        int                     err;
        unsigned char           fname[MAXPATHLEN + 1];
        int                     nres;
@@ -1140,7 +1136,7 @@ mv_orphanage(
                        libxfs_trans_ijoin(tp, orphanage_ip, 0);
                        libxfs_trans_ijoin(tp, ino_p, 0);
 
-                       libxfs_defer_init(tp, &dfops, &first);
+                       libxfs_defer_init(tp, &dfops);
                        err = -libxfs_dir_createname(tp, orphanage_ip, &xname,
                                                ino, nres);
                        if (err)
@@ -1183,7 +1179,7 @@ mv_orphanage(
                        libxfs_trans_ijoin(tp, orphanage_ip, 0);
                        libxfs_trans_ijoin(tp, ino_p, 0);
 
-                       libxfs_defer_init(tp, &dfops, &first);
+                       libxfs_defer_init(tp, &dfops);
 
                        err = -libxfs_dir_createname(tp, orphanage_ip, &xname,
                                                ino, nres);
@@ -1240,7 +1236,7 @@ mv_orphanage(
                libxfs_trans_ijoin(tp, orphanage_ip, 0);
                libxfs_trans_ijoin(tp, ino_p, 0);
 
-               libxfs_defer_init(tp, &dfops, &first);
+               libxfs_defer_init(tp, &dfops);
                err = -libxfs_dir_createname(tp, orphanage_ip, &xname, ino,
                                                nres);
                if (err)
@@ -1343,7 +1339,6 @@ longform_dir2_rebuild(
        int                     nres;
        xfs_trans_t             *tp;
        xfs_fileoff_t           lastblock;
-       xfs_fsblock_t           firstblock;
        struct xfs_defer_ops            dfops;
        xfs_inode_t             pip;
        dir_hash_ent_t          *p;
@@ -1367,7 +1362,7 @@ longform_dir2_rebuild(
            libxfs_dir_ino_validate(mp, pip.i_ino))
                pip.i_ino = mp->m_sb.sb_rootino;
 
-       libxfs_defer_init(NULL, &dfops, &firstblock);
+       libxfs_defer_init(NULL, &dfops);
 
        nres = XFS_REMOVE_SPACE_RES(mp);
        error = -libxfs_trans_alloc(mp, &M_RES(mp)->tr_remove, nres, 0, 0, &tp);
@@ -1424,7 +1419,7 @@ longform_dir2_rebuild(
 
                libxfs_trans_ijoin(tp, ip, 0);
 
-               libxfs_defer_init(tp, &dfops, &firstblock);
+               libxfs_defer_init(tp, &dfops);
                error = -libxfs_dir_createname(tp, ip, &p->name, p->inum,
                                                nres);
                if (error) {
@@ -1468,7 +1463,6 @@ dir2_kill_block(
 {
        xfs_da_args_t   args;
        int             error;
-       xfs_fsblock_t   firstblock;
        struct xfs_defer_ops    dfops;
        int             nres;
        xfs_trans_t     *tp;
@@ -1480,7 +1474,7 @@ dir2_kill_block(
        libxfs_trans_ijoin(tp, ip, 0);
        libxfs_trans_bjoin(tp, bp);
        memset(&args, 0, sizeof(args));
-       libxfs_defer_init(tp, &dfops, &firstblock);
+       libxfs_defer_init(tp, &dfops);
        args.dp = ip;
        args.trans = tp;
        args.whichfork = XFS_DATA_FORK;
@@ -1527,7 +1521,6 @@ longform_dir2_entry_check_data(
        struct xfs_dir2_data_free *bf;
        char                    *endptr;
        int                     error;
-       xfs_fsblock_t           firstblock;
        struct xfs_defer_ops            dfops;
        char                    fname[MAXNAMELEN + 1];
        freetab_t               *freetab;
@@ -1670,7 +1663,7 @@ longform_dir2_entry_check_data(
        libxfs_trans_ijoin(tp, ip, 0);
        libxfs_trans_bjoin(tp, bp);
        libxfs_trans_bhold(tp, bp);
-       libxfs_defer_init(tp, &dfops, &firstblock);
+       libxfs_defer_init(tp, &dfops);
        if (be32_to_cpu(d->magic) != wantmagic) {
                do_warn(
        _("bad directory block magic # %#x for directory inode %" PRIu64 " block %d: "),
@@ -2889,7 +2882,6 @@ process_dir_inode(
 {
        xfs_ino_t               ino;
        struct xfs_defer_ops            dfops;
-       xfs_fsblock_t           first;
        xfs_inode_t             *ip;
        xfs_trans_t             *tp;
        dir_hash_tab_t          *hashtab;
@@ -3025,7 +3017,7 @@ process_dir_inode(
 
                libxfs_trans_ijoin(tp, ip, 0);
 
-               libxfs_defer_init(tp, &dfops, &first);
+               libxfs_defer_init(tp, &dfops);
 
                error = -libxfs_dir_createname(tp, ip, &xfs_name_dotdot,
                                        ip->i_ino, nres);
@@ -3083,7 +3075,7 @@ process_dir_inode(
 
                        libxfs_trans_ijoin(tp, ip, 0);
 
-                       libxfs_defer_init(tp, &dfops, &first);
+                       libxfs_defer_init(tp, &dfops);
 
                        error = -libxfs_dir_createname(tp, ip, &xfs_name_dot,
                                        ip->i_ino, nres);