slab: fix typo in allocation failure handling

This patch fixes wrong array index in allocation failure handling.

Cc: Pekka Enberg <[email protected]>
Acked-by: Christoph Lameter <[email protected]>
Signed-off-by: Akinobu Mita <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Akinobu Mita 2007-11-14 16:58:35 -08:00 • committed by Linus Torvalds
commit cc550defe9

View file

@ -1043,7 +1043,7 @@ static struct array_cache **alloc_alien_cache(int node, int limit)
}
ac_ptr[i] = alloc_arraycache(node, limit, 0xbaadf00d);
if (!ac_ptr[i]) {
for (i--; i <= 0; i--)
for (i--; i >= 0; i--)
kfree(ac_ptr[i]);
kfree(ac_ptr);
return NULL;