aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/move_extents.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /fs/ocfs2/move_extents.c
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'fs/ocfs2/move_extents.c')
-rw-r--r--fs/ocfs2/move_extents.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c
index 6083432f667..d53cb706f14 100644
--- a/fs/ocfs2/move_extents.c
+++ b/fs/ocfs2/move_extents.c
@@ -745,7 +745,7 @@ static int ocfs2_move_extent(struct ocfs2_move_extents_context *context,
745 */ 745 */
746 ocfs2_probe_alloc_group(inode, gd_bh, &goal_bit, len, move_max_hop, 746 ocfs2_probe_alloc_group(inode, gd_bh, &goal_bit, len, move_max_hop,
747 new_phys_cpos); 747 new_phys_cpos);
748 if (!*new_phys_cpos) { 748 if (!new_phys_cpos) {
749 ret = -ENOSPC; 749 ret = -ENOSPC;
750 goto out_commit; 750 goto out_commit;
751 } 751 }
@@ -1059,7 +1059,7 @@ int ocfs2_ioctl_move_extents(struct file *filp, void __user *argp)
1059 struct ocfs2_move_extents range; 1059 struct ocfs2_move_extents range;
1060 struct ocfs2_move_extents_context *context = NULL; 1060 struct ocfs2_move_extents_context *context = NULL;
1061 1061
1062 status = mnt_want_write_file(filp); 1062 status = mnt_want_write(filp->f_path.mnt);
1063 if (status) 1063 if (status)
1064 return status; 1064 return status;
1065 1065
@@ -1082,7 +1082,8 @@ 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, argp, sizeof(range))) { 1085 if (copy_from_user(&range, (struct ocfs2_move_extents *)argp,
1086 sizeof(range))) {
1086 status = -EFAULT; 1087 status = -EFAULT;
1087 goto out; 1088 goto out;
1088 } 1089 }
@@ -1137,13 +1138,14 @@ out:
1137 * length and new_offset even if failure happens somewhere. 1138 * length and new_offset even if failure happens somewhere.
1138 */ 1139 */
1139 if (argp) { 1140 if (argp) {
1140 if (copy_to_user(argp, &range, sizeof(range))) 1141 if (copy_to_user((struct ocfs2_move_extents *)argp, &range,
1142 sizeof(range)))
1141 status = -EFAULT; 1143 status = -EFAULT;
1142 } 1144 }
1143 1145
1144 kfree(context); 1146 kfree(context);
1145 1147
1146 mnt_drop_write_file(filp); 1148 mnt_drop_write(filp->f_path.mnt);
1147 1149
1148 return status; 1150 return status;
1149} 1151}