Messages in this thread Patch in this message | | | From | Joonsoo Kim <> | Subject | [PATCH 2/2] slab: fix starting index for finding another object | Date | Sat, 25 Aug 2012 23:11:11 +0900 |
| |
In array cache, there is a object at index 0. So fix it.
Signed-off-by: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Christoph Lameter <cl@linux-foundation.org>
diff --git a/mm/slab.c b/mm/slab.c index 45cf59a..eb74bf5 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -976,7 +976,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]; -- 1.7.9.5
| |