diff options
author | Joonsoo Kim <js1304@gmail.com> | 2012-09-17 17:09:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-17 18:00:38 -0400 |
commit | d014dc2ed4fae84cb92509416c8bfc9078d4f0d9 (patch) | |
tree | 18fc37fa196f4450daa8f31b25313e350fed312d /mm/slab.c | |
parent | 30c29bea6af2d3b6ffc8865864de7fc08cadb5df (diff) |
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
@@ -983,7 +983,7 @@ static void *__ac_get_obj(struct kmem_cache *cachep, struct array_cache *ac, | |||
983 | } | 983 | } |
984 | 984 | ||
985 | /* The caller cannot use PFMEMALLOC objects, find another one */ | 985 | /* 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++) { |
987 | /* If a !PFMEMALLOC object is found, swap them */ | 987 | /* If a !PFMEMALLOC object is found, swap them */ |
988 | if (!is_obj_pfmemalloc(ac->entry[i])) { | 988 | if (!is_obj_pfmemalloc(ac->entry[i])) { |
989 | objp = ac->entry[i]; | 989 | objp = ac->entry[i]; |