diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 81b47bd8a55a..6b4bfa72bf8d 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -1873,8 +1873,8 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | |||
1873 | * but shouldn't round up the file size | 1873 | * but shouldn't round up the file size |
1874 | */ | 1874 | */ |
1875 | endoff = new_key.offset + datal; | 1875 | endoff = new_key.offset + datal; |
1876 | if (endoff > off+olen) | 1876 | if (endoff > destoff+olen) |
1877 | endoff = off+olen; | 1877 | endoff = destoff+olen; |
1878 | if (endoff > inode->i_size) | 1878 | if (endoff > inode->i_size) |
1879 | btrfs_i_size_write(inode, endoff); | 1879 | btrfs_i_size_write(inode, endoff); |
1880 | 1880 | ||