]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove xfs_bunmapi() dfops param
authorBrian Foster <bfoster@redhat.com>
Thu, 4 Oct 2018 19:31:01 +0000 (14:31 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 4 Oct 2018 19:31:01 +0000 (14:31 -0500)
Source kernel commit: ccd9d91148780a5e979ac00bce67c2155fb6378f

Now that all xfs_bunmapi() callers use ->t_dfops, remove the
unnecessary parameter and access ->t_dfops directly. This patch does
not change behavior.

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

index 862eaaabaede35f0d405b0313ff1142b0e8c97ba..b81363a42ab226b39f9c38aa7cab233798c1eb72 100644 (file)
@@ -624,7 +624,7 @@ xfs_attr_rmtval_remove(
                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->trans->t_dfops, &done);
+                                   &done);
                if (error)
                        goto out_defer_cancel;
                xfs_defer_ijoin(args->trans->t_dfops, args->dp);
index 301ff6a08edbc318e6cd47559b2f995197bff2b5..eb3751467b1c17de2a7552c284278e237c8ec105 100644 (file)
@@ -5134,26 +5134,26 @@ done:
  */
 int                                            /* error */
 __xfs_bunmapi(
-       xfs_trans_t             *tp,            /* transaction pointer */
+       struct xfs_trans        *tp,            /* transaction pointer */
        struct xfs_inode        *ip,            /* incore inode */
        xfs_fileoff_t           start,          /* first file offset deleted */
        xfs_filblks_t           *rlen,          /* i/o: amount remaining */
        int                     flags,          /* misc flags */
        xfs_extnum_t            nexts,          /* number of extents max */
-       xfs_fsblock_t           *firstblock,    /* first allocated block
+       xfs_fsblock_t           *firstblock)    /* first allocated block
                                                   controls a.g. for allocs */
-       struct xfs_defer_ops    *dfops)         /* i/o: deferred updates */
 {
-       xfs_btree_cur_t         *cur;           /* bmap btree cursor */
-       xfs_bmbt_irec_t         del;            /* extent being deleted */
+       struct xfs_defer_ops    *dfops = tp ? tp->t_dfops : NULL;
+       struct xfs_btree_cur    *cur;           /* bmap btree cursor */
+       struct xfs_bmbt_irec    del;            /* extent being deleted */
        int                     error;          /* error return value */
        xfs_extnum_t            extno;          /* extent number in list */
-       xfs_bmbt_irec_t         got;            /* current extent record */
+       struct xfs_bmbt_irec    got;            /* current extent record */
        xfs_ifork_t             *ifp;           /* inode fork pointer */
        int                     isrt;           /* freeing in rt area */
        int                     logflags;       /* transaction logging flags */
        xfs_extlen_t            mod;            /* rt extent offset */
-       xfs_mount_t             *mp;            /* mount structure */
+       struct xfs_mount        *mp;            /* mount structure */
        int                     tmp_logflags;   /* partial logging flags */
        int                     wasdel;         /* was a delayed alloc extent */
        int                     whichfork;      /* data or attribute fork */
@@ -5507,13 +5507,11 @@ xfs_bunmapi(
        int                     flags,
        xfs_extnum_t            nexts,
        xfs_fsblock_t           *firstblock,
-       struct xfs_defer_ops    *dfops,
        int                     *done)
 {
        int                     error;
 
-       error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts, firstblock,
-                       dfops);
+       error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts, firstblock);
        *done = (len == 0);
        return error;
 }
@@ -6184,7 +6182,7 @@ xfs_bmap_finish_one(
                break;
        case XFS_BMAP_UNMAP:
                error = __xfs_bunmapi(tp, ip, startoff, blockcount,
-                               XFS_BMAPI_REMAP, 1, &firstfsb, dfops);
+                               XFS_BMAPI_REMAP, 1, &firstfsb);
                break;
        default:
                ASSERT(0);
index fc86cc218c58882e3b9adcd5774954f89ce78639..a83906ec61418178ad09dd56813a802da5d5dbc2 100644 (file)
@@ -206,12 +206,11 @@ int       xfs_bmapi_write(struct xfs_trans *tp, struct xfs_inode *ip,
                struct xfs_bmbt_irec *mval, int *nmap);
 int    __xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip,
                xfs_fileoff_t bno, xfs_filblks_t *rlen, int flags,
-               xfs_extnum_t nexts, xfs_fsblock_t *firstblock,
-               struct xfs_defer_ops *dfops);
+               xfs_extnum_t nexts, xfs_fsblock_t *firstblock);
 int    xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip,
                xfs_fileoff_t bno, xfs_filblks_t len, int flags,
                xfs_extnum_t nexts, xfs_fsblock_t *firstblock,
-               struct xfs_defer_ops *dfops, int *done);
+               int *done);
 int    xfs_bmap_del_extent_delay(struct xfs_inode *ip, int whichfork,
                struct xfs_iext_cursor *cur, struct xfs_bmbt_irec *got,
                struct xfs_bmbt_irec *del);
index e74e64d3a1747a3946946e4975a6973bd6ac54b7..cd66272df7fdc97b8d08a90b74ca17c0c8a4b192 100644 (file)
@@ -2390,7 +2390,7 @@ xfs_da_shrink_inode(
                 */
                error = xfs_bunmapi(tp, dp, dead_blkno, count,
                                    xfs_bmapi_aflag(w), 0, args->firstblock,
-                                   args->trans->t_dfops, &done);
+                                   &done);
                if (error == -ENOSPC) {
                        if (w != XFS_DATA_FORK)
                                break;
index 6ad2b18853768451e90ab0365761d99a78feec4c..26a933e8d632adfcf46cdc0a76ae1893be35fab6 100644 (file)
@@ -662,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->trans->t_dfops, &done);
+                           args->firstblock, &done);
        if (error) {
                /*
                 * ENOSPC actually can happen if we're in a removename with no
index 57d00989682752f71e57c9365f73ffa8a1b26c84..eb99638f88284b706c57c2d03719d30a650fbcb0 100644 (file)
@@ -1394,7 +1394,7 @@ longform_dir2_rebuild(
 
        /* free all data, leaf, node and freespace blocks */
        error = -libxfs_bunmapi(tp, ip, 0, lastblock, XFS_BMAPI_METADATA, 0,
-                               &firstblock, &dfops, &done);
+                               &firstblock, &done);
        if (error) {
                do_warn(_("xfs_bunmapi failed -- error - %d\n"), error);
                goto out_bmap_cancel;