xfs: fix the check for COW extents in xfs_swap_extents
authorChristoph Hellwig <hch@lst.de>
Wed, 14 Mar 2018 06:15:30 +0000 (23:15 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 15 Mar 2018 17:31:38 +0000 (10:31 -0700)
commit5bcffe300ca708203ca926c17f7a509d4a01403d
tree97416c7a27f208eadc7bfbd266fa74384ed15ec5
parente6b965705685c7fc2f24a68410529f86c08c7277
xfs: fix the check for COW extents in xfs_swap_extents

i_cnextents does not include delayed allocated extents, so switch
to the inode fork size check that we already use in other places
instead.

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