From: Brian Foster Date: Thu, 4 Oct 2018 19:32:01 +0000 (-0500) Subject: xfs: remove xfs_bmapi_remap() dfops param X-Git-Tag: v4.19.0-rc0~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5d7ff9a20740ea8ee0f7382cd83d761dd352d9a;p=thirdparty%2Fxfsprogs-dev.git xfs: remove xfs_bmapi_remap() dfops param Source kernel commit: ff3edf255da7a1ceb0fb2cb7f195fc27edd0091d All xfs_bmapi_remap() callers already use ->t_dfops. Note that deferred completion context unconditionally sets ->t_dfops if it hasn't already been set by the caller. Remove the unnecessary parameter and access ->t_dfops directly. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index eb3751467..2fbbba3b3 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -4502,7 +4502,6 @@ xfs_bmapi_remap( xfs_fileoff_t bno, xfs_filblks_t len, xfs_fsblock_t startblock, - struct xfs_defer_ops *dfops, int flags) { struct xfs_mount *mp = ip->i_mount; @@ -4552,7 +4551,7 @@ xfs_bmapi_remap( 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; } @@ -4565,7 +4564,7 @@ xfs_bmapi_remap( got.br_state = XFS_EXT_NORM; error = xfs_bmap_add_extent_hole_real(tp, ip, whichfork, &icur, - &cur, &got, &firstblock, dfops, &logflags, flags); + &cur, &got, &firstblock, tp->t_dfops, &logflags, flags); if (error) goto error0; @@ -6176,8 +6175,9 @@ xfs_bmap_finish_one( switch (type) { case XFS_BMAP_MAP: + ASSERT(dfops == tp->t_dfops); error = xfs_bmapi_remap(tp, ip, startoff, *blockcount, - startblock, dfops, 0); + startblock, 0); *blockcount = 0; break; case XFS_BMAP_UNMAP: diff --git a/libxfs/xfs_bmap.h b/libxfs/xfs_bmap.h index a83906ec6..2728e98e9 100644 --- a/libxfs/xfs_bmap.h +++ b/libxfs/xfs_bmap.h @@ -284,6 +284,6 @@ xfs_failaddr_t xfs_bmap_validate_extent(struct xfs_inode *ip, int whichfork, int xfs_bmapi_remap(struct xfs_trans *tp, struct xfs_inode *ip, xfs_fileoff_t bno, xfs_filblks_t len, xfs_fsblock_t startblock, - struct xfs_defer_ops *dfops, int flags); + int flags); #endif /* __XFS_BMAP_H__ */