Commit d014dc2e authored by Joonsoo Kim's avatar Joonsoo Kim Committed by Linus Torvalds
Browse files

slab: fix starting index for finding another object

In array cache, there is a object at index 0, check it.

Signed-off-by: default avatarJoonsoo Kim <>
Signed-off-by: default avatarMel Gorman <>
Cc: David Miller <>
Cc: Chuck Lever <>
Cc: David Rientjes <>
Cc: Pekka Enberg <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 30c29bea
......@@ -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];
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment