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

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

xfs: remove xfs_bmapi_write() dfops param



Now that all callers use ->t_dfops, the xfs_bmapi_write() dfops
parameter is no longer necessary. Remove it 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 175d1a01
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -484,8 +484,7 @@ xfs_attr_rmtval_set(
		nmap = 1;
		nmap = 1;
		error = xfs_bmapi_write(args->trans, dp, (xfs_fileoff_t)lblkno,
		error = xfs_bmapi_write(args->trans, dp, (xfs_fileoff_t)lblkno,
				  blkcnt, XFS_BMAPI_ATTRFORK, args->firstblock,
				  blkcnt, XFS_BMAPI_ATTRFORK, args->firstblock,
				  args->total, &map, &nmap,
				  args->total, &map, &nmap);
				  args->trans->t_dfops);
		if (error)
		if (error)
			goto out_defer_cancel;
			goto out_defer_cancel;
		xfs_defer_ijoin(args->trans->t_dfops, dp);
		xfs_defer_ijoin(args->trans->t_dfops, dp);
+5 −5
Original line number Original line Diff line number Diff line
@@ -4245,8 +4245,7 @@ xfs_bmapi_write(
						   controls a.g. for allocs */
						   controls a.g. for allocs */
	xfs_extlen_t		total,		/* total blocks needed */
	xfs_extlen_t		total,		/* total blocks needed */
	struct xfs_bmbt_irec	*mval,		/* output: map values */
	struct xfs_bmbt_irec	*mval,		/* output: map values */
	int			*nmap,		/* i/o: mval size/count */
	int			*nmap)		/* i/o: mval size/count */
	struct xfs_defer_ops	*dfops)		/* i/o: list extents to free */
{
{
	struct xfs_mount	*mp = ip->i_mount;
	struct xfs_mount	*mp = ip->i_mount;
	struct xfs_ifork	*ifp;
	struct xfs_ifork	*ifp;
@@ -4337,7 +4336,7 @@ xfs_bmapi_write(
	bma.ip = ip;
	bma.ip = ip;
	bma.total = total;
	bma.total = total;
	bma.datatype = 0;
	bma.datatype = 0;
	bma.dfops = dfops;
	bma.dfops = tp ? tp->t_dfops : NULL;
	bma.firstblock = firstblock;
	bma.firstblock = firstblock;


	while (bno < end && n < *nmap) {
	while (bno < end && n < *nmap) {
@@ -4414,8 +4413,9 @@ xfs_bmapi_write(
			 * the refcount btree for orphan recovery.
			 * the refcount btree for orphan recovery.
			 */
			 */
			if (whichfork == XFS_COW_FORK) {
			if (whichfork == XFS_COW_FORK) {
				error = xfs_refcount_alloc_cow_extent(mp, dfops,
				error = xfs_refcount_alloc_cow_extent(mp,
						bma.blkno, bma.length);
						tp->t_dfops, bma.blkno,
						bma.length);
				if (error)
				if (error)
					goto error0;
					goto error0;
			}
			}
+1 −2
Original line number Original line Diff line number Diff line
@@ -203,8 +203,7 @@ int xfs_bmapi_read(struct xfs_inode *ip, xfs_fileoff_t bno,
int	xfs_bmapi_write(struct xfs_trans *tp, struct xfs_inode *ip,
int	xfs_bmapi_write(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_fsblock_t *firstblock, xfs_extlen_t total,
		xfs_fsblock_t *firstblock, xfs_extlen_t total,
		struct xfs_bmbt_irec *mval, int *nmap,
		struct xfs_bmbt_irec *mval, int *nmap);
		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 *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,
+2 −4
Original line number Original line Diff line number Diff line
@@ -2062,8 +2062,7 @@ xfs_da_grow_inode_int(
	ASSERT(args->firstblock != NULL);
	ASSERT(args->firstblock != NULL);
	error = xfs_bmapi_write(tp, dp, *bno, count,
	error = xfs_bmapi_write(tp, dp, *bno, count,
			xfs_bmapi_aflag(w)|XFS_BMAPI_METADATA|XFS_BMAPI_CONTIG,
			xfs_bmapi_aflag(w)|XFS_BMAPI_METADATA|XFS_BMAPI_CONTIG,
			args->firstblock, args->total, &map, &nmap,
			args->firstblock, args->total, &map, &nmap);
			args->trans->t_dfops);
	if (error)
	if (error)
		return error;
		return error;


@@ -2086,8 +2085,7 @@ xfs_da_grow_inode_int(
			error = xfs_bmapi_write(tp, dp, b, c,
			error = xfs_bmapi_write(tp, dp, b, c,
					xfs_bmapi_aflag(w)|XFS_BMAPI_METADATA,
					xfs_bmapi_aflag(w)|XFS_BMAPI_METADATA,
					args->firstblock, args->total,
					args->firstblock, args->total,
					&mapp[mapi], &nmap,
					&mapp[mapi], &nmap);
					args->trans->t_dfops);
			if (error)
			if (error)
				goto out_free_map;
				goto out_free_map;
			if (nmap < 1)
			if (nmap < 1)
+1 −1
Original line number Original line Diff line number Diff line
@@ -976,7 +976,7 @@ xfs_alloc_file_space(
		tp->t_dfops = &dfops;
		tp->t_dfops = &dfops;
		error = xfs_bmapi_write(tp, ip, startoffset_fsb,
		error = xfs_bmapi_write(tp, ip, startoffset_fsb,
					allocatesize_fsb, alloc_type, &firstfsb,
					allocatesize_fsb, alloc_type, &firstfsb,
					resblks, imapp, &nimaps, tp->t_dfops);
					resblks, imapp, &nimaps);
		if (error)
		if (error)
			goto error0;
			goto error0;


Loading