diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-10-21 13:09:18 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-10-21 13:09:18 +0200 |
commit | a2ab5fc41533c952706ebdfaa378bb746e535cc1 (patch) | |
tree | 9fb86bb4e9ecb67f7e651d284c2f12c6c5d4378f /fs/xfs/xfs_inode.c | |
parent | PM / core: Drop legacy class suspend/resume operations (diff) | |
parent | PM / sleep: Remove pm_complete_with_resume_check() (diff) | |
download | linux-a2ab5fc41533c952706ebdfaa378bb746e535cc1.tar.xz linux-a2ab5fc41533c952706ebdfaa378bb746e535cc1.zip |
Merge branch 'pm-sleep' into pm-core
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); } |