aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorChristoph Lameter <christoph@lameter.com>2005-07-06 13:47:07 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-06 13:52:45 -0400
commit83b78bd2d31f12d7d9317d9802a1996a7bd8a6f2 (patch)
tree79468471ee42a327cad337d065a9498833d5bd24 /mm/slab.c
parentb4634484815e1879512a23e4f59eef648135c30a (diff)
[PATCH] Fix broken kmalloc_node in rc1/rc2
This patch used to be in Andrew's tree before the NUMA slab allocator went in. Either this patch or the NUMA slab allocator is needed in order for kmalloc_node to work correctly. pcibus_to_node may be used to generate the node information passed to kmalloc_node. pcibus_to_node returns -1 if it was not able to determine on which node a pcibus is located. For that case kmalloc_node must work like kmalloc. Signed-off-by: Christoph Lameter <christoph@lameter.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 122d031baab2..e57abd45eede 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2372,6 +2372,9 @@ void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int nodeid)
2372 struct slab *slabp; 2372 struct slab *slabp;
2373 kmem_bufctl_t next; 2373 kmem_bufctl_t next;
2374 2374
2375 if (nodeid == -1)
2376 return kmem_cache_alloc(cachep, flags);
2377
2375 for (loop = 0;;loop++) { 2378 for (loop = 0;;loop++) {
2376 struct list_head *q; 2379 struct list_head *q;
2377 2380