mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
f2fs: avoid unneeded data copy in f2fs_ioc_move_range()
Fields in struct f2fs_move_range won't change in f2fs_ioc_move_range(), let's avoid copying this structure's data to userspace. Signed-off-by: Chao Yu <yuchao0@huawei.com> Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
e1e8debec6
commit
3a1b9eaf72
@ -2898,12 +2898,6 @@ static int f2fs_ioc_move_range(struct file *filp, unsigned long arg)
|
|||||||
range.pos_out, range.len);
|
range.pos_out, range.len);
|
||||||
|
|
||||||
mnt_drop_write_file(filp);
|
mnt_drop_write_file(filp);
|
||||||
if (err)
|
|
||||||
goto err_out;
|
|
||||||
|
|
||||||
if (copy_to_user((struct f2fs_move_range __user *)arg,
|
|
||||||
&range, sizeof(range)))
|
|
||||||
err = -EFAULT;
|
|
||||||
err_out:
|
err_out:
|
||||||
fdput(dst);
|
fdput(dst);
|
||||||
return err;
|
return err;
|
||||||
|
Loading…
Reference in New Issue
Block a user