linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Wang Shilong <wangshilong1991@gmail.com>
Cc: jack@suse.cz, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/2] Ext3: remove a useless check for the function ext3_free_blocks_sb
Date: Mon, 28 Jan 2013 15:07:57 +0100	[thread overview]
Message-ID: <20130128140757.GB32246@quack.suse.cz> (raw)
In-Reply-To: <51045F97.9070602@gmail.com>

On Sat 26-01-13 14:58:31, Wang Shilong wrote:
> From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
> 
> Because 'block + count < block' always comes to false, it is useless
> to have this check, just remove it.
  As Andreas commented, the test is actually correct. BTW any reason why
you sent the patch three times?

								Honza

> Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
> ---
>  fs/ext3/balloc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
> index 22548f5..c557f22 100644
> --- a/fs/ext3/balloc.c
> +++ b/fs/ext3/balloc.c
> @@ -507,7 +507,6 @@ void ext3_free_blocks_sb(handle_t *handle, struct super_block *sb,
>  	sbi = EXT3_SB(sb);
>  	es = sbi->s_es;
>  	if (block < le32_to_cpu(es->s_first_data_block) ||
> -	    block + count < block ||
>  	    block + count > le32_to_cpu(es->s_blocks_count)) {
>  		ext3_error (sb, "ext3_free_blocks",
>  			    "Freeing blocks not in datazone - "
> -- 1.7.11.7
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  reply	other threads:[~2013-01-28 14:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-26 22:58 [PATCH 2/2] Ext3: remove a useless check for the function ext3_free_blocks_sb Wang Shilong
2013-01-28 14:07 ` Jan Kara [this message]
2013-01-29  6:01   ` Wang Shilong
2013-01-29 14:40     ` Jan Kara
2013-01-29 17:08       ` Theodore Ts'o
  -- strict thread matches above, loose matches on Subject: below --
2012-01-26 22:55 Wang Shilong
2011-01-26 22:48 Wang Shilong
2013-01-27  7:40 ` Andreas Dilger

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=20130128140757.GB32246@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=wangshilong1991@gmail.com \
    /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).