Commit c437b273 authored by Akira Fujita's avatar Akira Fujita Committed by Theodore Ts'o

ext4: Code cleanup for EXT4_IOC_MOVE_EXT ioctl

a) Fix sparse warning in ext4_ioctl()
b) Remove unneeded variable in mext_leaf_block()
c) Fix spelling typo in mext_check_arguments()
Signed-off-by: default avatarAkira Fujita <a-fujita@rs.jp.nec.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 7247c0ca
...@@ -258,7 +258,8 @@ setversion_out: ...@@ -258,7 +258,8 @@ setversion_out:
if (me.moved_len > 0) if (me.moved_len > 0)
file_remove_suid(donor_filp); file_remove_suid(donor_filp);
if (copy_to_user((struct move_extent *)arg, &me, sizeof(me))) if (copy_to_user((struct move_extent __user *)arg,
&me, sizeof(me)))
err = -EFAULT; err = -EFAULT;
mext_out: mext_out:
fput(donor_filp); fput(donor_filp);
......
...@@ -477,7 +477,6 @@ mext_leaf_block(handle_t *handle, struct inode *orig_inode, ...@@ -477,7 +477,6 @@ mext_leaf_block(handle_t *handle, struct inode *orig_inode,
struct ext4_extent *oext, *o_start, *o_end, *prev_ext; struct ext4_extent *oext, *o_start, *o_end, *prev_ext;
struct ext4_extent new_ext, start_ext, end_ext; struct ext4_extent new_ext, start_ext, end_ext;
ext4_lblk_t new_ext_end; ext4_lblk_t new_ext_end;
ext4_fsblk_t new_phys_end;
int oext_alen, new_ext_alen, end_ext_alen; int oext_alen, new_ext_alen, end_ext_alen;
int depth = ext_depth(orig_inode); int depth = ext_depth(orig_inode);
int ret; int ret;
...@@ -491,7 +490,6 @@ mext_leaf_block(handle_t *handle, struct inode *orig_inode, ...@@ -491,7 +490,6 @@ mext_leaf_block(handle_t *handle, struct inode *orig_inode,
new_ext.ee_len = dext->ee_len; new_ext.ee_len = dext->ee_len;
new_ext_alen = ext4_ext_get_actual_len(&new_ext); new_ext_alen = ext4_ext_get_actual_len(&new_ext);
new_ext_end = le32_to_cpu(new_ext.ee_block) + new_ext_alen - 1; new_ext_end = le32_to_cpu(new_ext.ee_block) + new_ext_alen - 1;
new_phys_end = ext_pblock(&new_ext) + new_ext_alen - 1;
/* /*
* Case: original extent is first * Case: original extent is first
...@@ -932,7 +930,7 @@ out2: ...@@ -932,7 +930,7 @@ out2:
} }
/** /**
* mext_check_argumants - Check whether move extent can be done * mext_check_arguments - Check whether move extent can be done
* *
* @orig_inode: original inode * @orig_inode: original inode
* @donor_inode: donor inode * @donor_inode: donor inode
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment