diff options
| -rw-r--r-- | fs/btrfs/ioctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 028a4b8c12cd..63b4de1626d2 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
| @@ -2228,6 +2228,12 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | |||
| 2228 | !IS_ALIGNED(destoff, bs)) | 2228 | !IS_ALIGNED(destoff, bs)) |
| 2229 | goto out_unlock; | 2229 | goto out_unlock; |
| 2230 | 2230 | ||
| 2231 | if (destoff > inode->i_size) { | ||
| 2232 | ret = btrfs_cont_expand(inode, inode->i_size, destoff); | ||
| 2233 | if (ret) | ||
| 2234 | goto out_unlock; | ||
| 2235 | } | ||
| 2236 | |||
| 2231 | /* do any pending delalloc/csum calc on src, one way or | 2237 | /* do any pending delalloc/csum calc on src, one way or |
| 2232 | another, and lock file content */ | 2238 | another, and lock file content */ |
| 2233 | while (1) { | 2239 | while (1) { |
