mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
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>
This commit is contained in:
parent
daea696dba
commit
8d6669133d
1 changed files with 3 additions and 4 deletions
|
@ -243,10 +243,9 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue