[PATCH] slub: add missing slab_unlock() to __kmem_cache_shrink()

From: Pekka Enberg
Date: Fri Apr 11 2008 - 10:17:43 EST


If page is not kickable, remember to slab_unlock() before continuing the loop.

Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
---
mm/slub.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 4b694a7..f09f1fb 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2926,8 +2926,10 @@ static unsigned long __kmem_cache_shrink(struct kmem_cache *s, int node,
continue;

if (page->inuse) {
- if (!SlabKickable(page))
+ if (!SlabKickable(page)) {
+ slab_unlock(page);
continue;
+ }

if (page->inuse * 100 >=
s->defrag_ratio * page->objects) {
--
1.5.2.5



--
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/