xfs: evict CoW fork extents when performing finsert/fcollapse
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 18 Sep 2017 16:41:17 +0000 (09:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Oct 2017 08:38:09 +0000 (10:38 +0200)
commit92f606092f6c6f822ed23c3d5854909bd3b5bce6
tree58a6c962c8e09dce1f9bc996219aee819b8ad392
parent4e9de11c237724140c0ae14ead598c7fbc2847bd
xfs: evict CoW fork extents when performing finsert/fcollapse

commit 3af423b03435c81036fa710623d3ae92fbe346a3 upstream.

When we perform an finsert/fcollapse operation, cancel all the CoW
extents for the affected file offset range so that they don't end up
pointing to the wrong blocks.

Reported-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_bmap_util.c