aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 2bb08862a4f6..b3d249d6eba7 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2244,6 +2244,10 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
2244 btrfs_wait_ordered_range(src, off, len); 2244 btrfs_wait_ordered_range(src, off, len);
2245 } 2245 }
2246 2246
2247 /* truncate page cache pages from target inode range */
2248 truncate_inode_pages_range(&inode->i_data, off,
2249 ALIGN(off + len, PAGE_CACHE_SIZE) - 1);
2250
2247 /* clone data */ 2251 /* clone data */
2248 key.objectid = btrfs_ino(src); 2252 key.objectid = btrfs_ino(src);
2249 key.type = BTRFS_EXTENT_DATA_KEY; 2253 key.type = BTRFS_EXTENT_DATA_KEY;