diff options
author | Mike Kravetz <kravetz@us.ibm.com> | 2006-05-15 09:44:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-15 11:20:56 -0700 |
commit | 39d24e64263cd3211705d3b61ea4171c65030921 (patch) | |
tree | b527b1395b070180b7f930c0a89530f11bce7b3c /mm/sparse.c | |
parent | 48564e628bd7662d7a0b3ac81c41cd0e4cc36dae (diff) | |
download | lwn-39d24e64263cd3211705d3b61ea4171c65030921.tar.gz lwn-39d24e64263cd3211705d3b61ea4171c65030921.zip |
[PATCH] add slab_is_available() routine for boot code
slab_is_available() indicates slab based allocators are available for use.
SPARSEMEM code needs to know this as it can be called at various times
during the boot process.
Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/sparse.c')
-rw-r--r-- | mm/sparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/sparse.c b/mm/sparse.c index d7c32de99ee8..c5e89eb9ac8f 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -32,7 +32,7 @@ static struct mem_section *sparse_index_alloc(int nid) unsigned long array_size = SECTIONS_PER_ROOT * sizeof(struct mem_section); - if (system_state == SYSTEM_RUNNING) + if (slab_is_available()) section = kmalloc_node(array_size, GFP_KERNEL, nid); else section = alloc_bootmem_node(NODE_DATA(nid), array_size); |