提交 5bcffe30 编写于 作者: C Christoph Hellwig 提交者: Darrick J. Wong

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: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 e6b96570
...@@ -2014,11 +2014,11 @@ xfs_swap_extents( ...@@ -2014,11 +2014,11 @@ xfs_swap_extents(
ip->i_cowfp = tip->i_cowfp; ip->i_cowfp = tip->i_cowfp;
tip->i_cowfp = 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); xfs_inode_set_cowblocks_tag(ip);
else else
xfs_inode_clear_cowblocks_tag(ip); 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); xfs_inode_set_cowblocks_tag(tip);
else else
xfs_inode_clear_cowblocks_tag(tip); xfs_inode_clear_cowblocks_tag(tip);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册