Skip to content

Commit d014dc2

Browse files
JoonsooKimtorvalds
authored andcommitted
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>
1 parent 30c29be commit d014dc2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎mm/slab.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ static void *__ac_get_obj(struct kmem_cache *cachep, struct array_cache *ac,
983983
}
984984

985985
/* The caller cannot use PFMEMALLOC objects, find another one */
986-
for (i = 1; i < ac->avail; i++) {
986+
for (i = 0; i < ac->avail; i++) {
987987
/* If a !PFMEMALLOC object is found, swap them */
988988
if (!is_obj_pfmemalloc(ac->entry[i])) {
989989
objp = ac->entry[i];

0 commit comments

Comments
 (0)