]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: use ->t_dfops for collapse/insert range operations
authorBrian Foster <bfoster@redhat.com>
Thu, 4 Oct 2018 19:34:01 +0000 (14:34 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 4 Oct 2018 19:34:01 +0000 (14:34 -0500)
Source kernel commit: f4a9cf97faf4adb27e4e105beda420bb5253c502

Use ->t_dfops for the collapse and insert range transactions. These
are the only callers of the respective bmap helpers, so replace the
unnecessary dfops parameters with direct accesses to ->t_dfops.

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
libxfs/xfs_bmap.h

index bf7be8f2166a3c00bfcf0cc094e98f9cab7a836a..2e544ef5b65f10f139781db6fa28b4178d1e3e13 100644 (file)
@@ -5674,8 +5674,7 @@ xfs_bmap_collapse_extents(
        xfs_fileoff_t           *next_fsb,
        xfs_fileoff_t           offset_shift_fsb,
        bool                    *done,
-       xfs_fsblock_t           *firstblock,
-       struct xfs_defer_ops    *dfops)
+       xfs_fsblock_t           *firstblock)
 {
        int                     whichfork = XFS_DATA_FORK;
        struct xfs_mount        *mp = ip->i_mount;
@@ -5709,7 +5708,7 @@ xfs_bmap_collapse_extents(
        if (ifp->if_flags & XFS_IFBROOT) {
                cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork);
                cur->bc_private.b.firstblock = *firstblock;
-               cur->bc_private.b.dfops = dfops;
+               cur->bc_private.b.dfops = tp->t_dfops;
                cur->bc_private.b.flags = 0;
        }
 
@@ -5730,7 +5729,7 @@ xfs_bmap_collapse_extents(
                if (xfs_bmse_can_merge(&prev, &got, offset_shift_fsb)) {
                        error = xfs_bmse_merge(ip, whichfork, offset_shift_fsb,
                                        &icur, &got, &prev, cur, &logflags,
-                                       dfops);
+                                       tp->t_dfops);
                        if (error)
                                goto del_cursor;
                        goto done;
@@ -5743,7 +5742,7 @@ xfs_bmap_collapse_extents(
        }
 
        error = xfs_bmap_shift_update_extent(ip, whichfork, &icur, &got, cur,
-                       &logflags, dfops, new_startoff);
+                       &logflags, tp->t_dfops, new_startoff);
        if (error)
                goto del_cursor;
 
@@ -5797,8 +5796,7 @@ xfs_bmap_insert_extents(
        xfs_fileoff_t           offset_shift_fsb,
        bool                    *done,
        xfs_fileoff_t           stop_fsb,
-       xfs_fsblock_t           *firstblock,
-       struct xfs_defer_ops    *dfops)
+       xfs_fsblock_t           *firstblock)
 {
        int                     whichfork = XFS_DATA_FORK;
        struct xfs_mount        *mp = ip->i_mount;
@@ -5832,7 +5830,7 @@ xfs_bmap_insert_extents(
        if (ifp->if_flags & XFS_IFBROOT) {
                cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork);
                cur->bc_private.b.firstblock = *firstblock;
-               cur->bc_private.b.dfops = dfops;
+               cur->bc_private.b.dfops = tp->t_dfops;
                cur->bc_private.b.flags = 0;
        }
 
@@ -5875,7 +5873,7 @@ xfs_bmap_insert_extents(
        }
 
        error = xfs_bmap_shift_update_extent(ip, whichfork, &icur, &got, cur,
-                       &logflags, dfops, new_startoff);
+                       &logflags, tp->t_dfops, new_startoff);
        if (error)
                goto del_cursor;
 
index 56023560344408d0bac0fa87c777243f1908a441..83180c7cf3ee83109c41999b05b9329eaa29a2c5 100644 (file)
@@ -219,14 +219,12 @@ void      xfs_bmap_del_extent_cow(struct xfs_inode *ip,
 uint   xfs_default_attroffset(struct xfs_inode *ip);
 int    xfs_bmap_collapse_extents(struct xfs_trans *tp, struct xfs_inode *ip,
                xfs_fileoff_t *next_fsb, xfs_fileoff_t offset_shift_fsb,
-               bool *done, xfs_fsblock_t *firstblock,
-               struct xfs_defer_ops *dfops);
+               bool *done, xfs_fsblock_t *firstblock);
 int    xfs_bmap_can_insert_extents(struct xfs_inode *ip, xfs_fileoff_t off,
                xfs_fileoff_t shift);
 int    xfs_bmap_insert_extents(struct xfs_trans *tp, struct xfs_inode *ip,
                xfs_fileoff_t *next_fsb, xfs_fileoff_t offset_shift_fsb,
-               bool *done, xfs_fileoff_t stop_fsb, xfs_fsblock_t *firstblock,
-               struct xfs_defer_ops *dfops);
+               bool *done, xfs_fileoff_t stop_fsb, xfs_fsblock_t *firstblock);
 int    xfs_bmap_split_extent(struct xfs_inode *ip, xfs_fileoff_t split_offset);
 int    xfs_bmapi_reserve_delalloc(struct xfs_inode *ip, int whichfork,
                xfs_fileoff_t off, xfs_filblks_t len, xfs_filblks_t prealloc,