Skip to contentSkip to conversation

ext4: remove redundant offset check in move_extents.c/mext_check_arguments

PATCH Applied Wang Sheng-Hui 2 participants 2 messages Jul 23, 2012 – Sep 27, 2012 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: remove redundant offset check in move_extents.c/mext_check_arguments

In the check code above, if orig_start != donor_start, we would return -EINVAL. So here, orig_start should be equal with donor_start. Remove the redundant check here.

---
 fs/ext4/move_extent.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
fs/ext4/move_extent.c +0 -1
index c5826c6..8383257 100644
@@ -1002,7 +1002,6 @@ mext_check_arguments(struct inode *orig_inode,
 	}
 
 	if ((orig_start >= EXT_MAX_BLOCKS) ||
-	    (donor_start >= EXT_MAX_BLOCKS) ||
 	    (*len > EXT_MAX_BLOCKS) ||
 	    (orig_start + *len >= EXT_MAX_BLOCKS))  {
 		ext4_debug("ext4 move extent: Can't handle over [%u] blocks "
Signature · 1 line
1.7.1
maintainer Applied
#1 lore raw
Quoted 5 lines · Wang Sheng-Hui

In the check code above, if orig_start != donor_start, we would return -EINVAL. So here, orig_start should be equal with donor_start. Remove the redundant check here.

Applied, thanks. (And apologies for the delay in getting back to you!)

- Ted