summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2011-08-18 10:38:03 -0400
committerChris Mason <chris.mason@oracle.com>2011-08-18 10:38:03 -0400
commit81d86e1b70961f4816f961875e0c706b0954acad (patch)
treeac69ce2e8d174260770d1a84d7d8fe910939c923 /fs/btrfs/ioctl.c
parent9a4327ca1f45f82edad7dc0a4e52ce9316e0950c (diff)
parentf1e490a7ebe41e06324abbbcd86005b0af02a375 (diff)
downloadop-kernel-dev-81d86e1b70961f4816f961875e0c706b0954acad.zip
op-kernel-dev-81d86e1b70961f4816f961875e0c706b0954acad.tar.gz
Merge branch 'btrfs-3.0' into for-linus
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 7cf0133..970977a 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2236,6 +2236,10 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
btrfs_wait_ordered_range(src, off, len);
}
+ /* truncate page cache pages from target inode range */
+ truncate_inode_pages_range(&inode->i_data, off,
+ ALIGN(off + len, PAGE_CACHE_SIZE) - 1);
+
/* clone data */
key.objectid = btrfs_ino(src);
key.type = BTRFS_EXTENT_DATA_KEY;
OpenPOWER on IntegriCloud