public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@sw.ru>
To: Mingming Cao <cmm@us.ibm.com>
Cc: Alex Tomas <alex@clusterfs.com>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4:fix invariant checking in ext4_rebalance_reservation
Date: Tue, 19 Jun 2007 09:56:05 +0400	[thread overview]
Message-ID: <20070619055605.GA20172@localhost.sw.ru> (raw)
In-Reply-To: <20070616080200.GA14349@localhost.sw.ru>

On 12:02 Сбт 16 Июн     , Dmitry Monakhov wrote:
> Variable "free" was declarated as __u64 so conidition (free < 0) always
> false, even if free was overflowed during substraction.
> ---
>  fs/ext4/balloc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
> index 43ae8f8..a9655f1 100644
> --- a/fs/ext4/balloc.c
> +++ b/fs/ext4/balloc.c
> @@ -1909,8 +1909,8 @@ void ext4_rebalance_reservation(struct ext4_reservation_slot *rs, __u64 free)
>  			chunk = free;
>  		if (rs[i].rs_reserved || i == smp_processor_id()) {
>  			rs[i].rs_reserved = chunk;
> +			BUG_ON(free < chunk);
>  			free -= chunk;
> -			BUG_ON(free < 0);
>  		}
>  	}
>  	BUG_ON(free);
> -- 
> 1.5.2
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2007-06-19  5:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14  7:23 delayed allocatiou result in Oops Dmitriy Monakhov
2007-06-15  5:14 ` Alex Tomas
2007-06-15 23:16   ` Mingming Cao
2007-06-16  8:02     ` [PATCH] ext4:fix invariant checking in ext4_rebalance_reservation Dmitriy Monakhov
2007-06-18 21:09       ` Mingming Cao
2007-06-19  5:56       ` Dmitry Monakhov [this message]
2007-06-16  8:14     ` delayed allocatiou result in Oops Dmitriy Monakhov
2007-06-19  1:01       ` Mingming Cao
2007-06-19  7:11         ` Alex Tomas
2007-06-19  9:16           ` Dmitry Monakhov
2007-06-19  9:36             ` Alex Tomas
2007-06-19 21:50             ` Andreas Dilger
2007-06-19 16:23           ` Mingming Cao
2007-06-19 16:47             ` Aneesh Kumar K.V
2007-06-20  8:15             ` Alex Tomas
2007-06-20 23:46               ` Mingming Cao
2007-06-21  4:50                 ` Dmitry Monakhov

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=20070619055605.GA20172@localhost.sw.ru \
    --to=dmonakhov@sw.ru \
    --cc=alex@clusterfs.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@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