[PATCH] Fix two issues
From: Christoph Lameter
Date: Wed Nov 07 2007 - 02:19:40 EST
1. Check inverted in kmem_cache_create
2. partial counter not decremented in __kmem_cache_shrink
Signed-off-by: Christoph Lameter <clameter@xxxxxxx>
---
mm/slub.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 06fa4ed..de0557d 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2789,7 +2789,7 @@ static int kmem_cache_vacate(struct page *page, void *scratch)
BUG_ON(!PageSlab(page));
local_irq_save(flags);
state = slab_lock(page);
- BUG_ON(state & FROZEN);
+ BUG_ON(!(state & FROZEN));
s = page->slab;
map = scratch + max_defrag_slab_objects * sizeof(void **);
@@ -2902,6 +2902,7 @@ static unsigned long __kmem_cache_shrink(struct kmem_cache *s,
} else {
list_del(&page->lru);
+ n->nr_partial--;
slab_unlock(page, state);
discard_slab(s, page);
freed++;
--
1.5.3.4
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/