xfs: avoid infinite loop when cancelling CoW blocks after writeback failure
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 11 Dec 2017 02:03:55 +0000 (18:03 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 14 Dec 2017 17:20:11 +0000 (09:20 -0800)
commit9d40fba8b2056773b9744a95df9ddd6cc33a4f83
tree211491d1ec8fca4e39b4cf58266b2a6e005e8a61
parent73353f486c9b5b2407ec32be1004174dbbaf6c18
xfs: avoid infinite loop when cancelling CoW blocks after writeback failure

When we're cancelling a cow range, we don't always delete each extent
that we iterate, so we have to move icur backwards in the list to avoid
an infinite loop.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_reflink.c