projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
087d3d8
)
f2fs: avoid copy date to user-space if move file range fail
author
Kinglong Mee
<kinglongmee@gmail.com>
Fri, 10 Mar 2017 09:54:26 +0000
(17:54 +0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Wed, 22 Mar 2017 02:34:28 +0000
(22:34 -0400)
If move file range return error, the data copied to user-space is duplicate.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/f2fs/file.c
b/fs/f2fs/file.c
index c3c475675d77616cec94ac80d0bdcf4cbe3eefa5..cbde4d23e817fb725a38763924f2c9f4f00ce244 100644
(file)
--- a/
fs/f2fs/file.c
+++ b/
fs/f2fs/file.c
@@
-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)))