]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove bmap extent add helper firstblock params
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: 92f9da30f57bdb653ee46f26df2d51484b27c7f0

The add extent helpers all receive firstblock via ->t_firstblock.
Drop the parameter and access it directly.

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_bmap.c

index 3a328ae2701075c38e7ca0b1c00ca17bcf14a317..92102bd347c2309730682b71176d1a6b911bea39 100644 (file)
@@ -2022,7 +2022,6 @@ xfs_bmap_add_extent_unwritten_real(
        struct xfs_iext_cursor  *icur,
        xfs_btree_cur_t         **curp, /* if *curp is null, not a btree */
        xfs_bmbt_irec_t         *new,   /* new data to add to file extents */
-       xfs_fsblock_t           *first, /* pointer to firstblock variable */
        int                     *logflagsp) /* inode logging flags */
 {
        xfs_btree_cur_t         *cur;   /* btree cursor */
@@ -2464,8 +2463,8 @@ xfs_bmap_add_extent_unwritten_real(
                int     tmp_logflags;   /* partial log flag return val */
 
                ASSERT(cur == NULL);
-               error = xfs_bmap_extents_to_btree(tp, ip, first, &cur, 0,
-                               &tmp_logflags, whichfork);
+               error = xfs_bmap_extents_to_btree(tp, ip, &tp->t_firstblock,
+                               &cur, 0, &tmp_logflags, whichfork);
                *logflagsp |= tmp_logflags;
                if (error)
                        goto done;
@@ -2636,7 +2635,6 @@ xfs_bmap_add_extent_hole_real(
        struct xfs_iext_cursor  *icur,
        struct xfs_btree_cur    **curp,
        struct xfs_bmbt_irec    *new,
-       xfs_fsblock_t           *first,
        int                     *logflagsp,
        int                     flags)
 {
@@ -2828,8 +2826,8 @@ xfs_bmap_add_extent_hole_real(
                int     tmp_logflags;   /* partial log flag return val */
 
                ASSERT(cur == NULL);
-               error = xfs_bmap_extents_to_btree(tp, ip, first, curp, 0,
-                               &tmp_logflags, whichfork);
+               error = xfs_bmap_extents_to_btree(tp, ip, &tp->t_firstblock,
+                               curp, 0, &tmp_logflags, whichfork);
                *logflagsp |= tmp_logflags;
                cur = *curp;
                if (error)
@@ -4098,8 +4096,7 @@ xfs_bmapi_allocate(
        else
                error = xfs_bmap_add_extent_hole_real(bma->tp, bma->ip,
                                whichfork, &bma->icur, &bma->cur, &bma->got,
-                               &bma->tp->t_firstblock, &bma->logflags,
-                               bma->flags);
+                               &bma->logflags, bma->flags);
 
        bma->logflags |= tmp_logflags;
        if (error)
@@ -4167,8 +4164,7 @@ xfs_bmapi_convert_unwritten(
        }
 
        error = xfs_bmap_add_extent_unwritten_real(bma->tp, bma->ip, whichfork,
-                       &bma->icur, &bma->cur, mval, &bma->tp->t_firstblock,
-                       &tmp_logflags);
+                       &bma->icur, &bma->cur, mval, &tmp_logflags);
        /*
         * Log the inode core unconditionally in the unwritten extent conversion
         * path because the conversion might not have done so (e.g., if the
@@ -4541,7 +4537,7 @@ xfs_bmapi_remap(
                got.br_state = XFS_EXT_NORM;
 
        error = xfs_bmap_add_extent_hole_real(tp, ip, whichfork, &icur,
-                       &cur, &got, &tp->t_firstblock, &logflags, flags);
+                       &cur, &got, &logflags, flags);
        if (error)
                goto error0;
 
@@ -5305,7 +5301,7 @@ __xfs_bunmapi(
                        del.br_state = XFS_EXT_UNWRITTEN;
                        error = xfs_bmap_add_extent_unwritten_real(tp, ip,
                                        whichfork, &icur, &cur, &del,
-                                       &tp->t_firstblock, &logflags);
+                                       &logflags);
                        if (error)
                                goto error0;
                        goto nodelete;
@@ -5362,8 +5358,7 @@ __xfs_bunmapi(
                                prev.br_state = XFS_EXT_UNWRITTEN;
                                error = xfs_bmap_add_extent_unwritten_real(tp,
                                                ip, whichfork, &icur, &cur,
-                                               &prev, &tp->t_firstblock,
-                                               &logflags);
+                                               &prev, &logflags);
                                if (error)
                                        goto error0;
                                goto nodelete;
@@ -5372,8 +5367,7 @@ __xfs_bunmapi(
                                del.br_state = XFS_EXT_UNWRITTEN;
                                error = xfs_bmap_add_extent_unwritten_real(tp,
                                                ip, whichfork, &icur, &cur,
-                                               &del, &tp->t_firstblock,
-                                               &logflags);
+                                               &del, &logflags);
                                if (error)
                                        goto error0;
                                goto nodelete;