vfs: call vfs_clone_file_range() under freeze protection

Move sb_start_write()/sb_end_write() out of the vfs helper and up into the
ioctl handler.

Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
This commit is contained in:
Amir Goldstein 2016-09-23 11:38:11 +03:00 • committed by Miklos Szeredi
commit 031a072a0b
4 changed files with 15 additions and 6 deletions

View file

@ -226,7 +226,7 @@ static long ioctl_file_clone(struct file *dst_file, unsigned long srcfd,
ret = -EXDEV;
if (src_file.file->f_path.mnt != dst_file->f_path.mnt)
goto fdput;
ret = vfs_clone_file_range(src_file.file, off, dst_file, destoff, olen);
ret = do_clone_file_range(src_file.file, off, dst_file, destoff, olen);
fdput:
fdput(src_file);
return ret;