Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cecfa5f authored by Kinglong Mee's avatar Kinglong Mee Committed by Jaegeuk Kim
Browse files

f2fs: avoid copy date to user-space if move file range fail



If move file range return error, the data copied to user-space is duplicate.

Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 087d3d8b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2208,6 +2208,8 @@ static int f2fs_ioc_move_range(struct file *filp, unsigned long arg)
					range.pos_out, range.len);

	mnt_drop_write_file(filp);
	if (err)
		goto err_out;

	if (copy_to_user((struct f2fs_move_range __user *)arg,
						&range, sizeof(range)))