From: Wang Sheng-Hui <shhuiw@gmail.com>
To: Andreas Dilger <adilger.kernel@dilger.ca>,
Theodore Ts'o <tytso@mit.edu>,
ext4 development <linux-ext4@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] ext4: remove redundant offset check in move_extents.c/mext_check_arguments
Date: Mon, 23 Jul 2012 16:03:14 +0800 [thread overview]
Message-ID: <500D0542.1020000@gmail.com> (raw)
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.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
fs/ext4/move_extent.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index c5826c6..8383257 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -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 "
--
1.7.1
next reply other threads:[~2012-07-23 8:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 8:03 Wang Sheng-Hui [this message]
2012-09-27 12:03 ` [PATCH] ext4: remove redundant offset check in move_extents.c/mext_check_arguments Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=500D0542.1020000@gmail.com \
--to=shhuiw@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.