xfs: remove xfs_bmapi_remap() dfops param
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 <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>
This commit is contained in:

committed by
Darrick J. Wong

parent
ccd9d91148
commit
ff3edf255d
@@ -4511,7 +4511,6 @@ xfs_bmapi_remap(
|
|||||||
xfs_fileoff_t bno,
|
xfs_fileoff_t bno,
|
||||||
xfs_filblks_t len,
|
xfs_filblks_t len,
|
||||||
xfs_fsblock_t startblock,
|
xfs_fsblock_t startblock,
|
||||||
struct xfs_defer_ops *dfops,
|
|
||||||
int flags)
|
int flags)
|
||||||
{
|
{
|
||||||
struct xfs_mount *mp = ip->i_mount;
|
struct xfs_mount *mp = ip->i_mount;
|
||||||
@@ -4561,7 +4560,7 @@ xfs_bmapi_remap(
|
|||||||
if (ifp->if_flags & XFS_IFBROOT) {
|
if (ifp->if_flags & XFS_IFBROOT) {
|
||||||
cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork);
|
cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork);
|
||||||
cur->bc_private.b.firstblock = firstblock;
|
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;
|
cur->bc_private.b.flags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4574,7 +4573,7 @@ xfs_bmapi_remap(
|
|||||||
got.br_state = XFS_EXT_NORM;
|
got.br_state = XFS_EXT_NORM;
|
||||||
|
|
||||||
error = xfs_bmap_add_extent_hole_real(tp, ip, whichfork, &icur,
|
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)
|
if (error)
|
||||||
goto error0;
|
goto error0;
|
||||||
|
|
||||||
@@ -6185,8 +6184,9 @@ xfs_bmap_finish_one(
|
|||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case XFS_BMAP_MAP:
|
case XFS_BMAP_MAP:
|
||||||
|
ASSERT(dfops == tp->t_dfops);
|
||||||
error = xfs_bmapi_remap(tp, ip, startoff, *blockcount,
|
error = xfs_bmapi_remap(tp, ip, startoff, *blockcount,
|
||||||
startblock, dfops, 0);
|
startblock, 0);
|
||||||
*blockcount = 0;
|
*blockcount = 0;
|
||||||
break;
|
break;
|
||||||
case XFS_BMAP_UNMAP:
|
case XFS_BMAP_UNMAP:
|
||||||
|
@@ -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,
|
int xfs_bmapi_remap(struct xfs_trans *tp, struct xfs_inode *ip,
|
||||||
xfs_fileoff_t bno, xfs_filblks_t len, xfs_fsblock_t startblock,
|
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__ */
|
#endif /* __XFS_BMAP_H__ */
|
||||||
|
Reference in New Issue
Block a user