]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
slab: fix starting index for finding another object
authorJoonsoo Kim <js1304@gmail.com>
Fri, 7 Sep 2012 00:17:44 +0000 (10:17 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 10 Sep 2012 06:17:46 +0000 (16:17 +1000)
In array cache, there is a object at index 0, check it.

Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: David Miller <davem@davemloft.net>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/slab.c

index 1a86415833377b5d86f71a3d2143cbb9487338d0..d787688c48edc8d64fb69cc51fdb24678ccc7a6d 100644 (file)
--- 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];