diff options
author | David Sterba <dsterba@suse.com> | 2016-02-26 15:38:28 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-02-26 15:38:28 +0100 |
commit | 5f1b5664d97842bc5dba40c2053bf95270b6ff7a (patch) | |
tree | 28d6a3aaf9c095ab2703634693615559329ee3b2 /fs/btrfs/ioctl.c | |
parent | 388f7b1d6e8ca06762e2454d28d6c3c55ad0fe95 (diff) | |
parent | 65bfa6580791f8c01fbc9cd8bd73d92aea53723f (diff) | |
download | linux-5f1b5664d97842bc5dba40c2053bf95270b6ff7a.tar.bz2 |
Merge branch 'chandan/prep-subpage-blocksize' into for-chris-4.6
# Conflicts:
# fs/btrfs/file.c
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 952172ca7e45..93e7832d1d1b 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3814,8 +3814,9 @@ static noinline int btrfs_clone_files(struct file *file, struct file *file_src, * Truncate page cache pages so that future reads will see the cloned * data immediately and not the previous data. */ - truncate_inode_pages_range(&inode->i_data, destoff, - PAGE_CACHE_ALIGN(destoff + len) - 1); + truncate_inode_pages_range(&inode->i_data, + round_down(destoff, PAGE_CACHE_SIZE), + round_up(destoff + len, PAGE_CACHE_SIZE) - 1); out_unlock: if (!same_inode) btrfs_double_inode_unlock(src, inode); |