summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ioctl.c
diff options
context:
space:
mode:
authorAkira Fujita <a-fujita@rs.jp.nec.com>2009-09-05 22:46:29 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-09-05 22:46:29 -0400
commit8d6669133d8cdbb7cbe0e1f0f3744e7802a84afe (patch)
treeab4799f9299037ecb41de56bc1ad0b8c946c30f0 /fs/ext4/ioctl.c
parentdaea696dbac0e33af3cfe304efbfb8d74e0effe6 (diff)
ext4: Return exchanged blocks count to user space in failure
Return exchanged blocks count (moved_len) to user space, if ext4_move_extents() failed on the way. Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r--fs/ext4/ioctl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 7050a9cd04a..c1cdf613e72 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -243,10 +243,9 @@ setversion_out:
me.donor_start, me.len, &me.moved_len);
fput(donor_filp);
- if (!err)
- if (copy_to_user((struct move_extent *)arg,
- &me, sizeof(me)))
- return -EFAULT;
+ if (copy_to_user((struct move_extent *)arg, &me, sizeof(me)))
+ return -EFAULT;
+
return err;
}