提交 249b9f33 编写于 作者: R roel kluin 提交者: Pekka Enberg

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: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
上级 e9beef18
...@@ -2997,7 +2997,7 @@ static void *cache_alloc_refill(struct kmem_cache *cachep, gfp_t flags) ...@@ -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 * there must be at least one object available for
* allocation. * allocation.
*/ */
BUG_ON(slabp->inuse < 0 || slabp->inuse >= cachep->num); BUG_ON(slabp->inuse >= cachep->num);
while (slabp->inuse < cachep->num && batchcount--) { while (slabp->inuse < cachep->num && batchcount--) {
STATS_INC_ALLOCED(cachep); STATS_INC_ALLOCED(cachep);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册