]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: replace xfs_da_args->dfops accesses with ->t_dfops and remove
authorBrian Foster <bfoster@redhat.com>
Thu, 4 Oct 2018 19:29:01 +0000 (14:29 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 4 Oct 2018 19:29:01 +0000 (14:29 -0500)
Source kernel commit: 32a9b7c65cfc7d9283055fc9d61e6393ee2aa984

Now that xfs_da_args->dfops is always assigned from a ->t_dfops
pointer (or one that is immediately attached), replace all
downstream accesses of the former with the latter and remove the
field from struct xfs_da_args.

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/xfs_attr.c
libxfs/xfs_attr_leaf.c
libxfs/xfs_attr_remote.c
libxfs/xfs_bmap.c
libxfs/xfs_da_btree.c
libxfs/xfs_da_btree.h
libxfs/xfs_dir2.c
repair/phase6.c

index 802a7d5cc5a42ce942325f4a45a64a74be1a3b2f..8b5ff6559d6396b5b7f96e1f30b55c0790eeae1b 100644 (file)
@@ -215,7 +215,6 @@ xfs_attr_set(
        args.value = value;
        args.valuelen = valuelen;
        args.firstblock = &firstblock;
-       args.dfops = &dfops;
        args.op_flags = XFS_DA_OP_ADDNAME | XFS_DA_OP_OKNOENT;
        args.total = xfs_attr_calc_size(&args, &local);
 
@@ -402,7 +401,6 @@ xfs_attr_remove(
                return error;
 
        args.firstblock = &firstblock;
-       args.dfops = &dfops;
 
        /*
         * we have no control over the attribute names that userspace passes us
@@ -534,11 +532,12 @@ xfs_attr_shortform_addname(xfs_da_args_t *args)
  * if bmap_one_block() says there is only one block (ie: no remote blks).
  */
 STATIC int
-xfs_attr_leaf_addname(xfs_da_args_t *args)
+xfs_attr_leaf_addname(
+       struct xfs_da_args      *args)
 {
-       xfs_inode_t *dp;
-       struct xfs_buf *bp;
-       int retval, error, forkoff;
+       struct xfs_inode        *dp;
+       struct xfs_buf          *bp;
+       int                     retval, error, forkoff;
 
        trace_xfs_attr_leaf_addname(args);
 
@@ -596,12 +595,12 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
                 * Commit that transaction so that the node_addname() call
                 * can manage its own transactions.
                 */
-               xfs_defer_init(args->dfops, args->firstblock);
+               xfs_defer_init(args->trans->t_dfops, args->firstblock);
                error = xfs_attr3_leaf_to_node(args);
                if (error)
                        goto out_defer_cancel;
-               xfs_defer_ijoin(args->dfops, dp);
-               error = xfs_defer_finish(&args->trans, args->dfops);
+               xfs_defer_ijoin(args->trans->t_dfops, dp);
+               error = xfs_defer_finish(&args->trans, args->trans->t_dfops);
                if (error)
                        goto out_defer_cancel;
 
@@ -685,13 +684,13 @@ xfs_attr_leaf_addname(xfs_da_args_t *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->dfops, args->firstblock);
+                       xfs_defer_init(args->trans->t_dfops, args->firstblock);
                        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->dfops, dp);
-                       error = xfs_defer_finish(&args->trans, args->dfops);
+                       xfs_defer_ijoin(args->trans->t_dfops, dp);
+                       error = xfs_defer_finish(&args->trans, args->trans->t_dfops);
                        if (error)
                                goto out_defer_cancel;
                }
@@ -709,7 +708,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
        }
        return error;
 out_defer_cancel:
-       xfs_defer_cancel(args->dfops);
+       xfs_defer_cancel(args->trans->t_dfops);
        return error;
 }
 
@@ -720,11 +719,12 @@ out_defer_cancel:
  * if bmap_one_block() says there is only one block (ie: no remote blks).
  */
 STATIC int
-xfs_attr_leaf_removename(xfs_da_args_t *args)
+xfs_attr_leaf_removename(
+       struct xfs_da_args      *args)
 {
-       xfs_inode_t *dp;
-       struct xfs_buf *bp;
-       int error, forkoff;
+       struct xfs_inode        *dp;
+       struct xfs_buf          *bp;
+       int                     error, forkoff;
 
        trace_xfs_attr_leaf_removename(args);
 
@@ -749,19 +749,19 @@ xfs_attr_leaf_removename(xfs_da_args_t *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->dfops, args->firstblock);
+               xfs_defer_init(args->trans->t_dfops, args->firstblock);
                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->dfops, dp);
-               error = xfs_defer_finish(&args->trans, args->dfops);
+               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->dfops);
+       xfs_defer_cancel(args->trans->t_dfops);
        return error;
 }
 
@@ -812,13 +812,14 @@ xfs_attr_leaf_get(xfs_da_args_t *args)
  * add a whole extra layer of confusion on top of that.
  */
 STATIC int
-xfs_attr_node_addname(xfs_da_args_t *args)
+xfs_attr_node_addname(
+       struct xfs_da_args      *args)
 {
-       xfs_da_state_t *state;
-       xfs_da_state_blk_t *blk;
-       xfs_inode_t *dp;
-       xfs_mount_t *mp;
-       int retval, error;
+       struct xfs_da_state     *state;
+       struct xfs_da_state_blk *blk;
+       struct xfs_inode        *dp;
+       struct xfs_mount        *mp;
+       int                     retval, error;
 
        trace_xfs_attr_node_addname(args);
 
@@ -877,12 +878,13 @@ restart:
                         */
                        xfs_da_state_free(state);
                        state = NULL;
-                       xfs_defer_init(args->dfops, args->firstblock);
+                       xfs_defer_init(args->trans->t_dfops, args->firstblock);
                        error = xfs_attr3_leaf_to_node(args);
                        if (error)
                                goto out_defer_cancel;
-                       xfs_defer_ijoin(args->dfops, dp);
-                       error = xfs_defer_finish(&args->trans, args->dfops);
+                       xfs_defer_ijoin(args->trans->t_dfops, dp);
+                       error = xfs_defer_finish(&args->trans,
+                                                args->trans->t_dfops);
                        if (error)
                                goto out_defer_cancel;
 
@@ -903,12 +905,12 @@ restart:
                 * in the index/blkno/rmtblkno/rmtblkcnt fields and
                 * in the index2/blkno2/rmtblkno2/rmtblkcnt2 fields.
                 */
-               xfs_defer_init(args->dfops, args->firstblock);
+               xfs_defer_init(args->trans->t_dfops, args->firstblock);
                error = xfs_da3_split(state);
                if (error)
                        goto out_defer_cancel;
-               xfs_defer_ijoin(args->dfops, dp);
-               error = xfs_defer_finish(&args->trans, args->dfops);
+               xfs_defer_ijoin(args->trans->t_dfops, dp);
+               error = xfs_defer_finish(&args->trans, args->trans->t_dfops);
                if (error)
                        goto out_defer_cancel;
        } else {
@@ -1001,12 +1003,12 @@ restart:
                 * Check to see if the tree needs to be collapsed.
                 */
                if (retval && (state->path.active > 1)) {
-                       xfs_defer_init(args->dfops, args->firstblock);
+                       xfs_defer_init(args->trans->t_dfops, args->firstblock);
                        error = xfs_da3_join(state);
                        if (error)
                                goto out_defer_cancel;
-                       xfs_defer_ijoin(args->dfops, dp);
-                       error = xfs_defer_finish(&args->trans, args->dfops);
+                       xfs_defer_ijoin(args->trans->t_dfops, dp);
+                       error = xfs_defer_finish(&args->trans, args->trans->t_dfops);
                        if (error)
                                goto out_defer_cancel;
                }
@@ -1035,7 +1037,7 @@ out:
                return error;
        return retval;
 out_defer_cancel:
-       xfs_defer_cancel(args->dfops);
+       xfs_defer_cancel(args->trans->t_dfops);
        goto out;
 }
 
@@ -1047,13 +1049,14 @@ out_defer_cancel:
  * the root node (a special case of an intermediate node).
  */
 STATIC int
-xfs_attr_node_removename(xfs_da_args_t *args)
+xfs_attr_node_removename(
+       struct xfs_da_args      *args)
 {
-       xfs_da_state_t *state;
-       xfs_da_state_blk_t *blk;
-       xfs_inode_t *dp;
-       struct xfs_buf *bp;
-       int retval, error, forkoff;
+       struct xfs_da_state     *state;
+       struct xfs_da_state_blk *blk;
+       struct xfs_inode        *dp;
+       struct xfs_buf          *bp;
+       int                     retval, error, forkoff;
 
        trace_xfs_attr_node_removename(args);
 
@@ -1125,12 +1128,12 @@ xfs_attr_node_removename(xfs_da_args_t *args)
         * Check to see if the tree needs to be collapsed.
         */
        if (retval && (state->path.active > 1)) {
-               xfs_defer_init(args->dfops, args->firstblock);
+               xfs_defer_init(args->trans->t_dfops, args->firstblock);
                error = xfs_da3_join(state);
                if (error)
                        goto out_defer_cancel;
-               xfs_defer_ijoin(args->dfops, dp);
-               error = xfs_defer_finish(&args->trans, args->dfops);
+               xfs_defer_ijoin(args->trans->t_dfops, dp);
+               error = xfs_defer_finish(&args->trans, args->trans->t_dfops);
                if (error)
                        goto out_defer_cancel;
                /*
@@ -1157,13 +1160,13 @@ xfs_attr_node_removename(xfs_da_args_t *args)
                        goto out;
 
                if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) {
-                       xfs_defer_init(args->dfops, args->firstblock);
+                       xfs_defer_init(args->trans->t_dfops, args->firstblock);
                        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->dfops, dp);
-                       error = xfs_defer_finish(&args->trans, args->dfops);
+                       xfs_defer_ijoin(args->trans->t_dfops, dp);
+                       error = xfs_defer_finish(&args->trans, args->trans->t_dfops);
                        if (error)
                                goto out_defer_cancel;
                } else
@@ -1175,7 +1178,7 @@ out:
        xfs_da_state_free(state);
        return error;
 out_defer_cancel:
-       xfs_defer_cancel(args->dfops);
+       xfs_defer_cancel(args->trans->t_dfops);
        goto out;
 }
 
index de3543957d56bc29268a799affe0584d9b927cd6..a2e2fb1a72246dc780a254257c0f2e7f931789b8 100644 (file)
@@ -742,18 +742,18 @@ xfs_attr_shortform_getvalue(xfs_da_args_t *args)
  */
 int
 xfs_attr_shortform_to_leaf(
-       struct xfs_da_args      *args,
-       struct xfs_buf          **leaf_bp)
+       struct xfs_da_args              *args,
+       struct xfs_buf                  **leaf_bp)
 {
-       xfs_inode_t *dp;
-       xfs_attr_shortform_t *sf;
-       xfs_attr_sf_entry_t *sfe;
-       xfs_da_args_t nargs;
-       char *tmpbuffer;
-       int error, i, size;
-       xfs_dablk_t blkno;
-       struct xfs_buf *bp;
-       xfs_ifork_t *ifp;
+       struct xfs_inode                *dp;
+       struct xfs_attr_shortform       *sf;
+       struct xfs_attr_sf_entry        *sfe;
+       struct xfs_da_args              nargs;
+       char                            *tmpbuffer;
+       int                             error, i, size;
+       xfs_dablk_t                     blkno;
+       struct xfs_buf                  *bp;
+       struct xfs_ifork                *ifp;
 
        trace_xfs_attr_sf_to_leaf(args);
 
@@ -798,7 +798,6 @@ xfs_attr_shortform_to_leaf(
        nargs.dp = dp;
        nargs.geo = args->geo;
        nargs.firstblock = args->firstblock;
-       nargs.dfops = args->dfops;
        nargs.total = args->total;
        nargs.whichfork = XFS_ATTR_FORK;
        nargs.trans = args->trans;
@@ -1002,7 +1001,6 @@ xfs_attr3_leaf_to_shortform(
        nargs.geo = args->geo;
        nargs.dp = dp;
        nargs.firstblock = args->firstblock;
-       nargs.dfops = args->dfops;
        nargs.total = args->total;
        nargs.whichfork = XFS_ATTR_FORK;
        nargs.trans = args->trans;
index aae898c4701c63da919d3d7179c9de2f2dcdc792..8905b70da8caf8a389e36aba16e79a0e505be3c0 100644 (file)
@@ -475,15 +475,16 @@ 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->dfops, args->firstblock);
+               xfs_defer_init(args->trans->t_dfops, args->firstblock);
                nmap = 1;
                error = xfs_bmapi_write(args->trans, dp, (xfs_fileoff_t)lblkno,
                                  blkcnt, XFS_BMAPI_ATTRFORK, args->firstblock,
-                                 args->total, &map, &nmap, args->dfops);
+                                 args->total, &map, &nmap,
+                                 args->trans->t_dfops);
                if (error)
                        goto out_defer_cancel;
-               xfs_defer_ijoin(args->dfops, dp);
-               error = xfs_defer_finish(&args->trans, args->dfops);
+               xfs_defer_ijoin(args->trans->t_dfops, dp);
+               error = xfs_defer_finish(&args->trans, args->trans->t_dfops);
                if (error)
                        goto out_defer_cancel;
 
@@ -517,7 +518,7 @@ xfs_attr_rmtval_set(
 
                ASSERT(blkcnt > 0);
 
-               xfs_defer_init(args->dfops, args->firstblock);
+               xfs_defer_init(args->trans->t_dfops, args->firstblock);
                nmap = 1;
                error = xfs_bmapi_read(dp, (xfs_fileoff_t)lblkno,
                                       blkcnt, &map, &nmap,
@@ -552,7 +553,7 @@ xfs_attr_rmtval_set(
        ASSERT(valuelen == 0);
        return 0;
 out_defer_cancel:
-       xfs_defer_cancel(args->dfops);
+       xfs_defer_cancel(args->trans->t_dfops);
        args->trans = NULL;
        return error;
 }
@@ -621,14 +622,14 @@ xfs_attr_rmtval_remove(
        blkcnt = args->rmtblkcnt;
        done = 0;
        while (!done) {
-               xfs_defer_init(args->dfops, args->firstblock);
+               xfs_defer_init(args->trans->t_dfops, args->firstblock);
                error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
                                    XFS_BMAPI_ATTRFORK, 1, args->firstblock,
-                                   args->dfops, &done);
+                                   args->trans->t_dfops, &done);
                if (error)
                        goto out_defer_cancel;
-               xfs_defer_ijoin(args->dfops, args->dp);
-               error = xfs_defer_finish(&args->trans, args->dfops);
+               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;
 
@@ -641,7 +642,7 @@ xfs_attr_rmtval_remove(
        }
        return 0;
 out_defer_cancel:
-       xfs_defer_cancel(args->dfops);
+       xfs_defer_cancel(args->trans->t_dfops);
        args->trans = NULL;
        return error;
 }
index 58df0960bae39084ef3a5fb66abce7bb7ab21322..6d82d78e8c846e1aa7b66361da96c9ea5d7b1619 100644 (file)
@@ -998,7 +998,6 @@ xfs_bmap_add_attrfork_local(
                dargs.geo = ip->i_mount->m_dir_geo;
                dargs.dp = ip;
                dargs.firstblock = firstblock;
-               dargs.dfops = tp->t_dfops;
                dargs.total = dargs.geo->fsbcount;
                dargs.whichfork = XFS_DATA_FORK;
                dargs.trans = tp;
index 51f0d5608e46eed655be2f279c55cc590741f629..6b58585570a2a3ca209a19c2b993ceee1b43e1ce 100644 (file)
@@ -2058,7 +2058,7 @@ xfs_da_grow_inode_int(
        error = xfs_bmapi_write(tp, dp, *bno, count,
                        xfs_bmapi_aflag(w)|XFS_BMAPI_METADATA|XFS_BMAPI_CONTIG,
                        args->firstblock, args->total, &map, &nmap,
-                       args->dfops);
+                       args->trans->t_dfops);
        if (error)
                return error;
 
@@ -2081,7 +2081,8 @@ xfs_da_grow_inode_int(
                        error = xfs_bmapi_write(tp, dp, b, c,
                                        xfs_bmapi_aflag(w)|XFS_BMAPI_METADATA,
                                        args->firstblock, args->total,
-                                       &mapp[mapi], &nmap, args->dfops);
+                                       &mapp[mapi], &nmap,
+                                       args->trans->t_dfops);
                        if (error)
                                goto out_free_map;
                        if (nmap < 1)
@@ -2370,13 +2371,13 @@ done:
  */
 int
 xfs_da_shrink_inode(
-       xfs_da_args_t   *args,
-       xfs_dablk_t     dead_blkno,
-       struct xfs_buf  *dead_buf)
+       struct xfs_da_args      *args,
+       xfs_dablk_t             dead_blkno,
+       struct xfs_buf          *dead_buf)
 {
-       xfs_inode_t *dp;
-       int done, error, w, count;
-       xfs_trans_t *tp;
+       struct xfs_inode        *dp;
+       int                     done, error, w, count;
+       struct xfs_trans        *tp;
 
        trace_xfs_da_shrink_inode(args);
 
@@ -2391,7 +2392,7 @@ xfs_da_shrink_inode(
                 */
                error = xfs_bunmapi(tp, dp, dead_blkno, count,
                                    xfs_bmapi_aflag(w), 0, args->firstblock,
-                                   args->dfops, &done);
+                                   args->trans->t_dfops, &done);
                if (error == -ENOSPC) {
                        if (w != XFS_DATA_FORK)
                                break;
index 28260073ae71af3d1f7bbbb277fe2d9677843067..6b8a04f3f16256d6697f79dad88600db68145ed7 100644 (file)
@@ -58,7 +58,6 @@ typedef struct xfs_da_args {
        xfs_ino_t       inumber;        /* input/output inode number */
        struct xfs_inode *dp;           /* directory inode to manipulate */
        xfs_fsblock_t   *firstblock;    /* ptr to firstblock for bmap calls */
-       struct xfs_defer_ops *dfops;    /* ptr to freelist for bmap_finish */
        struct xfs_trans *trans;        /* current trans (changes over time) */
        xfs_extlen_t    total;          /* total blocks needed, for 1st bmap */
        int             whichfork;      /* data or attribute fork */
index 05b270abaf33ec7fcab4c87ebbf1bc093d86823a..6ad2b18853768451e90ab0365761d99a78feec4c 100644 (file)
@@ -237,8 +237,8 @@ xfs_dir_init(
  */
 int
 xfs_dir_createname(
-       xfs_trans_t             *tp,
-       xfs_inode_t             *dp,
+       struct xfs_trans        *tp,
+       struct xfs_inode        *dp,
        struct xfs_name         *name,
        xfs_ino_t               inum,           /* new entry inode number */
        xfs_fsblock_t           *first,         /* bmap's firstblock */
@@ -272,7 +272,6 @@ xfs_dir_createname(
        args->total = total;
        args->whichfork = XFS_DATA_FORK;
        args->trans = tp;
-       args->dfops = tp->t_dfops;
        args->firstblock = first;
        args->op_flags = XFS_DA_OP_ADDNAME | XFS_DA_OP_OKNOENT;
        if (!inum)
@@ -415,16 +414,16 @@ out_free:
  */
 int
 xfs_dir_removename(
-       xfs_trans_t     *tp,
-       xfs_inode_t     *dp,
-       struct xfs_name *name,
-       xfs_ino_t       ino,
-       xfs_fsblock_t   *first,         /* bmap's firstblock */
-       xfs_extlen_t    total)          /* bmap's total block count */
+       struct xfs_trans        *tp,
+       struct xfs_inode        *dp,
+       struct xfs_name         *name,
+       xfs_ino_t               ino,
+       xfs_fsblock_t           *first,         /* bmap's firstblock */
+       xfs_extlen_t            total)          /* bmap's total block count */
 {
-       struct xfs_da_args *args;
-       int             rval;
-       int             v;              /* type-checking value */
+       struct xfs_da_args      *args;
+       int                     rval;
+       int                     v;              /* type-checking value */
 
        ASSERT(S_ISDIR(VFS_I(dp)->i_mode));
        ASSERT(tp->t_dfops);
@@ -445,7 +444,6 @@ xfs_dir_removename(
        args->total = total;
        args->whichfork = XFS_DATA_FORK;
        args->trans = tp;
-       args->dfops = tp->t_dfops;
 
        if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) {
                rval = xfs_dir2_sf_removename(args);
@@ -477,16 +475,16 @@ out_free:
  */
 int
 xfs_dir_replace(
-       xfs_trans_t     *tp,
-       xfs_inode_t     *dp,
-       struct xfs_name *name,          /* name of entry to replace */
-       xfs_ino_t       inum,           /* new inode number */
-       xfs_fsblock_t   *first,         /* bmap's firstblock */
-       xfs_extlen_t    total)          /* bmap's total block count */
+       struct xfs_trans        *tp,
+       struct xfs_inode        *dp,
+       struct xfs_name         *name,          /* name of entry to replace */
+       xfs_ino_t               inum,           /* new inode number */
+       xfs_fsblock_t           *first,         /* bmap's firstblock */
+       xfs_extlen_t            total)          /* bmap's total block count */
 {
-       struct xfs_da_args *args;
-       int             rval;
-       int             v;              /* type-checking value */
+       struct xfs_da_args      *args;
+       int                     rval;
+       int                     v;              /* type-checking value */
 
        ASSERT(S_ISDIR(VFS_I(dp)->i_mode));
        ASSERT(tp->t_dfops);
@@ -510,7 +508,6 @@ xfs_dir_replace(
        args->total = total;
        args->whichfork = XFS_DATA_FORK;
        args->trans = tp;
-       args->dfops = tp->t_dfops;
 
        if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) {
                rval = xfs_dir2_sf_replace(args);
@@ -644,17 +641,17 @@ xfs_dir2_isleaf(
  */
 int
 xfs_dir2_shrink_inode(
-       xfs_da_args_t   *args,
-       xfs_dir2_db_t   db,
-       struct xfs_buf  *bp)
+       struct xfs_da_args      *args,
+       xfs_dir2_db_t           db,
+       struct xfs_buf          *bp)
 {
-       xfs_fileoff_t   bno;            /* directory file offset */
-       xfs_dablk_t     da;             /* directory file offset */
-       int             done;           /* bunmap is finished */
-       xfs_inode_t     *dp;
-       int             error;
-       xfs_mount_t     *mp;
-       xfs_trans_t     *tp;
+       xfs_fileoff_t           bno;            /* directory file offset */
+       xfs_dablk_t             da;             /* directory file offset */
+       int                     done;           /* bunmap is finished */
+       struct xfs_inode        *dp;
+       int                     error;
+       struct xfs_mount        *mp;
+       struct xfs_trans        *tp;
 
        trace_xfs_dir2_shrink_inode(args, db);
 
@@ -665,7 +662,7 @@ xfs_dir2_shrink_inode(
 
        /* Unmap the fsblock(s). */
        error = xfs_bunmapi(tp, dp, da, args->geo->fsbcount, 0, 0,
-                           args->firstblock, args->dfops, &done);
+                           args->firstblock, args->trans->t_dfops, &done);
        if (error) {
                /*
                 * ENOSPC actually can happen if we're in a removename with no
index f011e24e159866eeb6cc5451f9392200fe6c83cc..d3000c728a74978694d6ecb0a05b64831b380cfa 100644 (file)
@@ -1494,7 +1494,6 @@ dir2_kill_block(
        args.dp = ip;
        args.trans = tp;
        args.firstblock = &firstblock;
-       args.dfops = &dfops;
        args.whichfork = XFS_DATA_FORK;
        args.geo = mp->m_dir_geo;
        if (da_bno >= mp->m_dir_geo->leafblk && da_bno < mp->m_dir_geo->freeblk)