From: "Manish Katiyar" <mkatiyar@gmail.com>
To: "Kari Hurtta" <hurtta+gmane@siilo.fmi.fi>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ext4 : Remove redundant condition in ext4_free_blocks_sb()
Date: Sun, 1 Jun 2008 12:00:02 +0530 [thread overview]
Message-ID: <ea11fea30805312330s48dadc55x442dfc3e5f40b046@mail.gmail.com> (raw)
In-Reply-To: <5d4p8du0xc.fsf@Hurtta06k.keh.iki.fi>
On Sun, Jun 1, 2008 at 11:55 AM, Kari Hurtta <hurtta+gmane@siilo.fmi.fi> wrote:
> "Manish Katiyar" <mkatiyar@gmail.com> writes in
> gmane.linux.file-systems:
>
>> For two unsigned values the check "block+count < block" is always
>> false. Thus the below patch removes that condition.
>>
>> =============================================================
>>
>> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>>
>> --- a/fs/ext4/balloc.c 2008-05-18 18:07:45.000000000 +0530
>> +++ b/fs/ext4/balloc.c 2008-06-01 00:05:48.000000000 +0530
>> @@ -619,7 +619,6 @@
>> sbi = EXT4_SB(sb);
>> es = sbi->s_es;
>> if (block < le32_to_cpu(es->s_first_data_block) ||
>> - block + count < block ||
>> block + count > ext4_blocks_count(es)) {
>> ext4_error (sb, "ext4_free_blocks",
>> "Freeing blocks not in datazone - "
>>
>>
>> =============================================================
>
> Hmm. Consider situation where block + count > max unsigned value
> mathematically
>
> in that case
> block + count < block
> expression may be true
Yeah.... my bad..... Al Viro pointed it out. Sorry for that
>
>
>> --
>> Thanks & Regards,
>> ********************************************
>> Manish Katiyar ( http://mkatiyar.googlepages.com )
>> 3rd Floor, Fair Winds Block
>> EGL Software Park
>> Off Intermediate Ring Road
>> Bangalore 560071, India
>> ***********************************************
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> / Kari Hurtta
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Thanks & Regards,
********************************************
Manish Katiyar ( http://mkatiyar.googlepages.com )
3rd Floor, Fair Winds Block
EGL Software Park
Off Intermediate Ring Road
Bangalore 560071, India
***********************************************
prev parent reply other threads:[~2008-06-01 6:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-31 18:56 [PATCH] ext4 : Remove redundant condition in ext4_free_blocks_sb() Manish Katiyar
2008-06-01 6:25 ` Kari Hurtta
2008-06-01 6:30 ` Manish Katiyar [this message]
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=ea11fea30805312330s48dadc55x442dfc3e5f40b046@mail.gmail.com \
--to=mkatiyar@gmail.com \
--cc=hurtta+gmane@siilo.fmi.fi \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/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