summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_util.c
diff options
context:
space:
mode:
authorChristoph Hellwig2018-03-14 07:15:30 +0100
committerDarrick J. Wong2018-03-15 18:31:38 +0100
commit5bcffe300ca708203ca926c17f7a509d4a01403d (patch)
tree97416c7a27f208eadc7bfbd266fa74384ed15ec5 /fs/xfs/xfs_bmap_util.c
parentxfs: refactor xfs_log_force (diff)
downloadkernel-qcow2-linux-5bcffe300ca708203ca926c17f7a509d4a01403d.tar.gz
kernel-qcow2-linux-5bcffe300ca708203ca926c17f7a509d4a01403d.tar.xz
kernel-qcow2-linux-5bcffe300ca708203ca926c17f7a509d4a01403d.zip
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>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r--fs/xfs/xfs_bmap_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index e0a442f504e5..19ea7d086cf8 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -2014,11 +2014,11 @@ xfs_swap_extents(
ip->i_cowfp = tip->i_cowfp;
tip->i_cowfp = cowfp;
- if (ip->i_cowfp && ip->i_cnextents)
+ if (ip->i_cowfp && ip->i_cowfp->if_bytes)
xfs_inode_set_cowblocks_tag(ip);
else
xfs_inode_clear_cowblocks_tag(ip);
- if (tip->i_cowfp && tip->i_cnextents)
+ if (tip->i_cowfp && tip->i_cowfp->if_bytes)
xfs_inode_set_cowblocks_tag(tip);
else
xfs_inode_clear_cowblocks_tag(tip);