diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-08-18 14:38:03 (GMT) |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-08-18 14:38:03 (GMT) |
commit | 81d86e1b70961f4816f961875e0c706b0954acad (patch) | |
tree | ac69ce2e8d174260770d1a84d7d8fe910939c923 /fs/btrfs/ioctl.c | |
parent | 9a4327ca1f45f82edad7dc0a4e52ce9316e0950c (diff) | |
parent | f1e490a7ebe41e06324abbbcd86005b0af02a375 (diff) | |
download | linux-fsl-qoriq-81d86e1b70961f4816f961875e0c706b0954acad.tar.xz |
Merge branch 'btrfs-3.0' into for-linus
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 4 |
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; |