tree 79468471ee42a327cad337d065a9498833d5bd24
parent b4634484815e1879512a23e4f59eef648135c30a
author Christoph Lameter <[EMAIL PROTECTED]> Thu, 07 Jul 2005 00:47:07 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Thu, 07 Jul 2005 00:52:45 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 mm/slab.c |    3 +++
 1 files changed, 3 insertions(+)

diff --git a/mm/slab.c b/mm/slab.c
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2372,6 +2372,9 @@ void *kmem_cache_alloc_node(kmem_cache_t
        struct slab *slabp;
        kmem_bufctl_t next;
 
+       if (nodeid == -1)
+               return kmem_cache_alloc(cachep, flags);
+
        for (loop = 0;;loop++) {
                struct list_head *q;
 
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to