diff options
author | Christoph Hellwig <hch@lst.de> | 2018-09-28 23:47:46 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2018-09-28 23:47:46 -0400 |
commit | 0065b54119973c9089f8222c1c8f9237ed9787a9 (patch) | |
tree | b6c53077d1fe10356b92085c9ed912964fb19cd1 | |
parent | df307077916fde42734a49022fc8ed23cc58caa4 (diff) |
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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index ae3cc393724f..6de8d90041ff 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c | |||
@@ -702,13 +702,9 @@ xfs_bmap_punch_delalloc_range( | |||
702 | struct xfs_iext_cursor icur; | 702 | struct xfs_iext_cursor icur; |
703 | int error = 0; | 703 | int error = 0; |
704 | 704 | ||
705 | xfs_ilock(ip, XFS_ILOCK_EXCL); | 705 | ASSERT(ifp->if_flags & XFS_IFEXTENTS); |
706 | if (!(ifp->if_flags & XFS_IFEXTENTS)) { | ||
707 | error = xfs_iread_extents(NULL, ip, XFS_DATA_FORK); | ||
708 | if (error) | ||
709 | goto out_unlock; | ||
710 | } | ||
711 | 706 | ||
707 | xfs_ilock(ip, XFS_ILOCK_EXCL); | ||
712 | if (!xfs_iext_lookup_extent_before(ip, ifp, &end_fsb, &icur, &got)) | 708 | if (!xfs_iext_lookup_extent_before(ip, ifp, &end_fsb, &icur, &got)) |
713 | goto out_unlock; | 709 | goto out_unlock; |
714 | 710 | ||