diff options
author | Brian Foster <bfoster@redhat.com> | 2018-07-11 22:26:15 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-11 22:26:15 -0700 |
commit | f4a9cf97faf4adb27e4e105beda420bb5253c502 (patch) | |
tree | 66af2d83dd7fcaea01e11509ab84b26a69b472d5 /fs/xfs/libxfs/xfs_bmap.c | |
parent | 3e3673e3029c1dedf75a1688a5203d9550adf490 (diff) | |
download | lwn-f4a9cf97faf4adb27e4e105beda420bb5253c502.tar.gz lwn-f4a9cf97faf4adb27e4e105beda420bb5253c502.zip |
xfs: use ->t_dfops for collapse/insert range operations
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index e24c54799aae..89a21dc7a7cb 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -5683,8 +5683,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; @@ -5718,7 +5717,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; } @@ -5739,7 +5738,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; @@ -5752,7 +5751,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; @@ -5806,8 +5805,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; @@ -5841,7 +5839,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; } @@ -5884,7 +5882,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; |