aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonsoo Kim <[email protected]>2012-09-17 14:09:06 -0700
committerLinus Torvalds <[email protected]>2012-09-17 15:00:38 -0700
commitd014dc2ed4fae84cb92509416c8bfc9078d4f0d9 (patch)
tree18fc37fa196f4450daa8f31b25313e350fed312d
parent30c29bea6af2d3b6ffc8865864de7fc08cadb5df (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 <[email protected]> Signed-off-by: Mel Gorman <[email protected]> Cc: David Miller <[email protected]> Cc: Chuck Lever <[email protected]> Cc: David Rientjes <[email protected]> Cc: Pekka Enberg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/slab.c2
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];