Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccd9d911 authored by Brian Foster's avatar Brian Foster Committed by Darrick J. Wong
Browse files

xfs: remove xfs_bunmapi() dfops param



Now that all xfs_bunmapi() callers use ->t_dfops, remove the
unnecessary parameter and access ->t_dfops directly. This patch does
not change behavior.

Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 4bcfa613
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -629,7 +629,7 @@ xfs_attr_rmtval_remove(
		xfs_defer_init(args->trans->t_dfops, args->firstblock);
		xfs_defer_init(args->trans->t_dfops, args->firstblock);
		error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
		error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
				    XFS_BMAPI_ATTRFORK, 1, args->firstblock,
				    XFS_BMAPI_ATTRFORK, 1, args->firstblock,
				    args->trans->t_dfops, &done);
				    &done);
		if (error)
		if (error)
			goto out_defer_cancel;
			goto out_defer_cancel;
		xfs_defer_ijoin(args->trans->t_dfops, args->dp);
		xfs_defer_ijoin(args->trans->t_dfops, args->dp);
+9 −11
Original line number Original line Diff line number Diff line
@@ -5143,26 +5143,26 @@ xfs_bmap_del_extent_real(
 */
 */
int						/* error */
int						/* error */
__xfs_bunmapi(
__xfs_bunmapi(
	xfs_trans_t		*tp,		/* transaction pointer */
	struct xfs_trans	*tp,		/* transaction pointer */
	struct xfs_inode	*ip,		/* incore inode */
	struct xfs_inode	*ip,		/* incore inode */
	xfs_fileoff_t		start,		/* first file offset deleted */
	xfs_fileoff_t		start,		/* first file offset deleted */
	xfs_filblks_t		*rlen,		/* i/o: amount remaining */
	xfs_filblks_t		*rlen,		/* i/o: amount remaining */
	int			flags,		/* misc flags */
	int			flags,		/* misc flags */
	xfs_extnum_t		nexts,		/* number of extents max */
	xfs_extnum_t		nexts,		/* number of extents max */
	xfs_fsblock_t		*firstblock,	/* first allocated block
	xfs_fsblock_t		*firstblock)	/* first allocated block
						   controls a.g. for allocs */
						   controls a.g. for allocs */
	struct xfs_defer_ops	*dfops)		/* i/o: deferred updates */
{
{
	xfs_btree_cur_t		*cur;		/* bmap btree cursor */
	struct xfs_defer_ops	*dfops = tp ? tp->t_dfops : NULL;
	xfs_bmbt_irec_t		del;		/* extent being deleted */
	struct xfs_btree_cur	*cur;		/* bmap btree cursor */
	struct xfs_bmbt_irec	del;		/* extent being deleted */
	int			error;		/* error return value */
	int			error;		/* error return value */
	xfs_extnum_t		extno;		/* extent number in list */
	xfs_extnum_t		extno;		/* extent number in list */
	xfs_bmbt_irec_t		got;		/* current extent record */
	struct xfs_bmbt_irec	got;		/* current extent record */
	xfs_ifork_t		*ifp;		/* inode fork pointer */
	xfs_ifork_t		*ifp;		/* inode fork pointer */
	int			isrt;		/* freeing in rt area */
	int			isrt;		/* freeing in rt area */
	int			logflags;	/* transaction logging flags */
	int			logflags;	/* transaction logging flags */
	xfs_extlen_t		mod;		/* rt extent offset */
	xfs_extlen_t		mod;		/* rt extent offset */
	xfs_mount_t		*mp;		/* mount structure */
	struct xfs_mount	*mp;		/* mount structure */
	int			tmp_logflags;	/* partial logging flags */
	int			tmp_logflags;	/* partial logging flags */
	int			wasdel;		/* was a delayed alloc extent */
	int			wasdel;		/* was a delayed alloc extent */
	int			whichfork;	/* data or attribute fork */
	int			whichfork;	/* data or attribute fork */
@@ -5516,13 +5516,11 @@ xfs_bunmapi(
	int			flags,
	int			flags,
	xfs_extnum_t		nexts,
	xfs_extnum_t		nexts,
	xfs_fsblock_t		*firstblock,
	xfs_fsblock_t		*firstblock,
	struct xfs_defer_ops	*dfops,
	int			*done)
	int			*done)
{
{
	int			error;
	int			error;


	error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts, firstblock,
	error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts, firstblock);
			dfops);
	*done = (len == 0);
	*done = (len == 0);
	return error;
	return error;
}
}
@@ -6193,7 +6191,7 @@ xfs_bmap_finish_one(
		break;
		break;
	case XFS_BMAP_UNMAP:
	case XFS_BMAP_UNMAP:
		error = __xfs_bunmapi(tp, ip, startoff, blockcount,
		error = __xfs_bunmapi(tp, ip, startoff, blockcount,
				XFS_BMAPI_REMAP, 1, &firstfsb, dfops);
				XFS_BMAPI_REMAP, 1, &firstfsb);
		break;
		break;
	default:
	default:
		ASSERT(0);
		ASSERT(0);
+2 −3
Original line number Original line Diff line number Diff line
@@ -206,12 +206,11 @@ int xfs_bmapi_write(struct xfs_trans *tp, struct xfs_inode *ip,
		struct xfs_bmbt_irec *mval, int *nmap);
		struct xfs_bmbt_irec *mval, int *nmap);
int	__xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip,
int	__xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip,
		xfs_fileoff_t bno, xfs_filblks_t *rlen, int flags,
		xfs_fileoff_t bno, xfs_filblks_t *rlen, int flags,
		xfs_extnum_t nexts, xfs_fsblock_t *firstblock,
		xfs_extnum_t nexts, xfs_fsblock_t *firstblock);
		struct xfs_defer_ops *dfops);
int	xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip,
int	xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip,
		xfs_fileoff_t bno, xfs_filblks_t len, int flags,
		xfs_fileoff_t bno, xfs_filblks_t len, int flags,
		xfs_extnum_t nexts, xfs_fsblock_t *firstblock,
		xfs_extnum_t nexts, xfs_fsblock_t *firstblock,
		struct xfs_defer_ops *dfops, int *done);
		int *done);
int	xfs_bmap_del_extent_delay(struct xfs_inode *ip, int whichfork,
int	xfs_bmap_del_extent_delay(struct xfs_inode *ip, int whichfork,
		struct xfs_iext_cursor *cur, struct xfs_bmbt_irec *got,
		struct xfs_iext_cursor *cur, struct xfs_bmbt_irec *got,
		struct xfs_bmbt_irec *del);
		struct xfs_bmbt_irec *del);
+1 −1
Original line number Original line Diff line number Diff line
@@ -2395,7 +2395,7 @@ xfs_da_shrink_inode(
		 */
		 */
		error = xfs_bunmapi(tp, dp, dead_blkno, count,
		error = xfs_bunmapi(tp, dp, dead_blkno, count,
				    xfs_bmapi_aflag(w), 0, args->firstblock,
				    xfs_bmapi_aflag(w), 0, args->firstblock,
				    args->trans->t_dfops, &done);
				    &done);
		if (error == -ENOSPC) {
		if (error == -ENOSPC) {
			if (w != XFS_DATA_FORK)
			if (w != XFS_DATA_FORK)
				break;
				break;
+1 −1
Original line number Original line Diff line number Diff line
@@ -664,7 +664,7 @@ xfs_dir2_shrink_inode(


	/* Unmap the fsblock(s). */
	/* Unmap the fsblock(s). */
	error = xfs_bunmapi(tp, dp, da, args->geo->fsbcount, 0, 0,
	error = xfs_bunmapi(tp, dp, da, args->geo->fsbcount, 0, 0,
			    args->firstblock, args->trans->t_dfops, &done);
			    args->firstblock, &done);
	if (error) {
	if (error) {
		/*
		/*
		 * ENOSPC actually can happen if we're in a removename with no
		 * ENOSPC actually can happen if we're in a removename with no
Loading