Commit cc550def authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

slab: fix typo in allocation failure handling

This patch fixes wrong array index in allocation failure handling.

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: default avatarChristoph Lameter <clameter@sgi.com>
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e9b5a495
...@@ -1043,7 +1043,7 @@ static struct array_cache **alloc_alien_cache(int node, int limit) ...@@ -1043,7 +1043,7 @@ static struct array_cache **alloc_alien_cache(int node, int limit)
} }
ac_ptr[i] = alloc_arraycache(node, limit, 0xbaadf00d); ac_ptr[i] = alloc_arraycache(node, limit, 0xbaadf00d);
if (!ac_ptr[i]) { if (!ac_ptr[i]) {
for (i--; i <= 0; i--) for (i--; i >= 0; i--)
kfree(ac_ptr[i]); kfree(ac_ptr[i]);
kfree(ac_ptr); kfree(ac_ptr);
return NULL; return NULL;
......
Markdown is supported
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