From: Joonsoo Kim Date: Mon, 17 Sep 2012 21:09:06 +0000 (-0700) Subject: slab: fix starting index for finding another object X-Git-Tag: v3.6-rc7~34^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d014dc2ed4fae84cb92509416c8bfc9078d4f0d9;p=profile%2Fivi%2Fkernel-x86-ivi.git slab: fix starting index for finding another object In array cache, there is a object at index 0, check it. Signed-off-by: Joonsoo Kim Signed-off-by: Mel Gorman Cc: David Miller Cc: Chuck Lever Cc: David Rientjes Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slab.c b/mm/slab.c index d34a903..c685475 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -983,7 +983,7 @@ static void *__ac_get_obj(struct kmem_cache *cachep, struct array_cache *ac, } /* The caller cannot use PFMEMALLOC objects, find another one */ - for (i = 1; i < ac->avail; i++) { + for (i = 0; i < ac->avail; i++) { /* If a !PFMEMALLOC object is found, swap them */ if (!is_obj_pfmemalloc(ac->entry[i])) { objp = ac->entry[i];