mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-06 18:54:22 -05:00
slab: unsigned slabp->inuse cannot be less than 0
unsigned slabp->inuse cannot be less than 0 Acked-by: Christoph Lameter <cl@linux-foundation.org Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
This commit is contained in:
@@ -2997,7 +2997,7 @@ static void *cache_alloc_refill(struct kmem_cache *cachep, gfp_t flags)
|
||||
* there must be at least one object available for
|
||||
* allocation.
|
||||
*/
|
||||
BUG_ON(slabp->inuse < 0 || slabp->inuse >= cachep->num);
|
||||
BUG_ON(slabp->inuse >= cachep->num);
|
||||
|
||||
while (slabp->inuse < cachep->num && batchcount--) {
|
||||
STATS_INC_ALLOCED(cachep);
|
||||
|
||||
Reference in New Issue
Block a user