linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wang Shilong <wangshilong1991@gmail.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH] Ext4: remove a useless check for the function ext4_data_block_valid
Date: Wed, 26 Jan 2011 14:45:52 -0800	[thread overview]
Message-ID: <4D40A420.8060207@gmail.com> (raw)

From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>

Because it is no doubt 'start_blk + count < start_blk' always comes to
false. It is useless to have this check,remove it.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
---
 fs/ext4/block_validity.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c
index 3f11656..5ffce82 100644
--- a/fs/ext4/block_validity.c
+++ b/fs/ext4/block_validity.c
@@ -226,7 +226,6 @@ int ext4_data_block_valid(struct ext4_sb_info *sbi, ext4_fsblk_t start_blk,
 	struct rb_node *n = sbi->system_blks.rb_node;
 
 	if ((start_blk <= le32_to_cpu(sbi->s_es->s_first_data_block)) ||
-	    (start_blk + count < start_blk) ||
 	    (start_blk + count > ext4_blocks_count(sbi->s_es))) {
 		sbi->s_es->s_last_error_block = cpu_to_le64(start_blk);
 		return 0;
-- 1.7.11.7


             reply	other threads:[~2013-01-26  6:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 22:45 Wang Shilong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-26 22:55 [PATCH] Ext4: remove a useless check for the function ext4_data_block_valid Wang Shilong
2013-01-26 22:57 Wang Shilong
2013-01-26 15:38 ` Theodore Ts'o
2013-01-28  0:46   ` Wang Shilong
2013-01-27 12:38     ` 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=4D40A420.8060207@gmail.com \
    --to=wangshilong1991@gmail.com \
    --cc=linux-ext4@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).