mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Pekka J Enberg <penberg@cs.helsinki.fi>
Cc: akpm@linux-foundation.org, mcr@sandelman.ca,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] slab: ensure cache_alloc_refill terminates
Date: Wed, 21 Feb 2007 09:51:04 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702210950310.24344@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0702211029340.9758@sbz-30.cs.Helsinki.FI>

On Wed, 21 Feb 2007, Pekka J Enberg wrote:

> +		 */
> +		BUG_ON(slabp->inuse < 0 || slabp->inuse >= cachep->num);
> +
>  		while (slabp->inuse < cachep->num && batchcount--) {

I think you only need to check for <0. If slabp->inuse > cachep->num then 
the loop will not be taken.

  reply	other threads:[~2007-02-21 17:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-21  8:30 Pekka J Enberg
2007-02-21 17:51 ` Christoph Lameter [this message]
2007-02-21 18:22   ` Pekka Enberg
2007-02-21 18:28     ` Christoph Lameter
  -- strict thread matches above, loose matches on Subject: below --
2007-02-19  8:22 Pekka J Enberg
2007-02-19  8:48 ` KAMEZAWA Hiroyuki
2007-02-19  8:58   ` Pekka J Enberg
2007-02-20  5:05 ` Christoph Lameter

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=Pine.LNX.4.64.0702210950310.24344@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcr@sandelman.ca \
    --cc=penberg@cs.helsinki.fi \
    /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

all inboxes | Powered by JetHome®