xfs: always swap the cow forks when swapping extents
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 18 Sep 2017 16:41:18 +0000 (09:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Oct 2017 08:38:09 +0000 (10:38 +0200)
commit002295a6be81afc10dce31e72251a7215f9e28ee
tree6b1fdaa2ea7d3748f56f3966ea756222010c72a7
parentd59a3f7f3caab4ac5cf6cf497a657cc1221e0f7f
xfs: always swap the cow forks when swapping extents

commit 52bfcdd7adbc26639bc7b2356ab9a3f5dad68ad6 upstream.

Since the CoW fork exists as a secondary data structure to the data
fork, we must always swap cow forks during swapext.  We also need to
swap the extent counts and reset the cowblocks tags.

Reviewed-by: Brian Foster <bfoster@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