提交 83b78bd2 编写于 作者: C Christoph Lameter 提交者: Linus Torvalds

[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: NChristoph Lameter <christoph@lameter.com>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 b4634484
...@@ -2372,6 +2372,9 @@ void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int nodeid) ...@@ -2372,6 +2372,9 @@ void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int nodeid)
struct slab *slabp; struct slab *slabp;
kmem_bufctl_t next; kmem_bufctl_t next;
if (nodeid == -1)
return kmem_cache_alloc(cachep, flags);
for (loop = 0;;loop++) { for (loop = 0;;loop++) {
struct list_head *q; struct list_head *q;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册