summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_bmap_util.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2017-10-18 12:37:31 +0300
committerJani Nikula <jani.nikula@intel.com>2017-10-18 12:37:31 +0300
commit526b96c4f8dceb0104e267c61e5a3b22c538570c (patch)
tree8825258c4f678f5ad9fddc0afaf72d640458481a /fs/xfs/xfs_bmap_util.c
parentcb8d50dfb341e9615c8d203a3e6513dae9ff901d (diff)
parent40d86701a625eed9e644281b9af228d6a52d8ed9 (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_bmap_util.c')
-rw-r--r--fs/xfs/xfs_bmap_util.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index cd9a5400ba4f..bc6c6e10a969 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1459,7 +1459,19 @@ xfs_shift_file_space(
return error;
/*
- * The extent shiting code works on extent granularity. So, if
+ * Clean out anything hanging around in the cow fork now that
+ * we've flushed all the dirty data out to disk to avoid having
+ * CoW extents at the wrong offsets.
+ */
+ if (xfs_is_reflink_inode(ip)) {
+ error = xfs_reflink_cancel_cow_range(ip, offset, NULLFILEOFF,
+ true);
+ if (error)
+ return error;
+ }
+
+ /*
+ * The extent shifting code works on extent granularity. So, if
* stop_fsb is not the starting block of extent, we need to split
* the extent at stop_fsb.
*/