diff options
| author | Jani Nikula <jani.nikula@intel.com> | 2017-10-18 12:37:31 +0300 |
|---|---|---|
| committer | Jani Nikula <jani.nikula@intel.com> | 2017-10-18 12:37:31 +0300 |
| commit | 526b96c4f8dceb0104e267c61e5a3b22c538570c (patch) | |
| tree | 8825258c4f678f5ad9fddc0afaf72d640458481a /fs/xfs/xfs_inode.c | |
| parent | cb8d50dfb341e9615c8d203a3e6513dae9ff901d (diff) | |
| parent | 40d86701a625eed9e644281b9af228d6a52d8ed9 (diff) | |
Merge drm-upstream/drm-next into drm-intel-next-queued
Needed for timer_setup() and drm_dev_{get,put}() conversions in i915.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
| -rw-r--r-- | fs/xfs/xfs_inode.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 5599dda4727a..4ec5b7f45401 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -1624,10 +1624,12 @@ xfs_itruncate_extents( goto out; /* - * Clear the reflink flag if we truncated everything. + * Clear the reflink flag if there are no data fork blocks and + * there are no extents staged in the cow fork. */ - if (ip->i_d.di_nblocks == 0 && xfs_is_reflink_inode(ip)) { - ip->i_d.di_flags2 &= ~XFS_DIFLAG2_REFLINK; + if (xfs_is_reflink_inode(ip) && ip->i_cnextents == 0) { + if (ip->i_d.di_nblocks == 0) + ip->i_d.di_flags2 &= ~XFS_DIFLAG2_REFLINK; xfs_inode_clear_cowblocks_tag(ip); } |
