diff options
author | Joonsoo Kim <js1304@gmail.com> | 2012-09-17 23:09:06 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-18 00:00:38 +0200 |
commit | d014dc2ed4fae84cb92509416c8bfc9078d4f0d9 (patch) | |
tree | 18fc37fa196f4450daa8f31b25313e350fed312d /mm/slab.c | |
parent | slab: do ClearSlabPfmemalloc() for all pages of slab (diff) | |
download | linux-d014dc2ed4fae84cb92509416c8bfc9078d4f0d9.tar.xz linux-d014dc2ed4fae84cb92509416c8bfc9078d4f0d9.zip |
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 <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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slab.c b/mm/slab.c index d34a9034f929..c6854759bcf1 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]; |