aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/move_extents.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/move_extents.c')
-rw-r--r--fs/ocfs2/move_extents.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c
index b1e3fce72ea4..6083432f667e 100644
--- a/fs/ocfs2/move_extents.c
+++ b/fs/ocfs2/move_extents.c
@@ -1082,8 +1082,7 @@ int ocfs2_ioctl_move_extents(struct file *filp, void __user *argp)
1082 context->file = filp; 1082 context->file = filp;
1083 1083
1084 if (argp) { 1084 if (argp) {
1085 if (copy_from_user(&range, (struct ocfs2_move_extents *)argp, 1085 if (copy_from_user(&range, argp, sizeof(range))) {
1086 sizeof(range))) {
1087 status = -EFAULT; 1086 status = -EFAULT;
1088 goto out; 1087 goto out;
1089 } 1088 }
@@ -1138,8 +1137,7 @@ out:
1138 * length and new_offset even if failure happens somewhere. 1137 * length and new_offset even if failure happens somewhere.
1139 */ 1138 */
1140 if (argp) { 1139 if (argp) {
1141 if (copy_to_user((struct ocfs2_move_extents *)argp, &range, 1140 if (copy_to_user(argp, &range, sizeof(range)))
1142 sizeof(range)))
1143 status = -EFAULT; 1141 status = -EFAULT;
1144 } 1142 }
1145 1143