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

Commit 0065b541 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Dave Chinner
Browse files

xfs: don't bring in extents in xfs_bmap_punch_delalloc_range



This function is only used to punch out delayed allocations on I/O
failure, which means we need to have read the extents earlier.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent df307077
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -702,13 +702,9 @@ xfs_bmap_punch_delalloc_range(
	struct xfs_iext_cursor	icur;
	int			error = 0;

	xfs_ilock(ip, XFS_ILOCK_EXCL);
	if (!(ifp->if_flags & XFS_IFEXTENTS)) {
		error = xfs_iread_extents(NULL, ip, XFS_DATA_FORK);
		if (error)
			goto out_unlock;
	}
	ASSERT(ifp->if_flags & XFS_IFEXTENTS);

	xfs_ilock(ip, XFS_ILOCK_EXCL);
	if (!xfs_iext_lookup_extent_before(ip, ifp, &end_fsb, &icur, &got))
		goto out_unlock;