From 199f0ca514f9c17668eec4f935c4ba24cd789f85 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Tue, 29 Apr 2008 01:03:13 -0700 Subject: idr: create idr_layer_cache at boot time Avoid a possible kmem_cache_create() failure by creating idr_layer_cache unconditionary at boot time rather than creating it on-demand when idr_init() is called the first time. This change also enables us to eliminate the check every time idr_init() is called. [akpm@linux-foundation.org: rename init_id_cache() to idr_init_cache()] [akpm@linux-foundation.org: fix alpha build] Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- init/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'init/main.c') diff --git a/init/main.c b/init/main.c index c62c98f381f2..624266b524d4 100644 --- a/init/main.c +++ b/init/main.c @@ -58,6 +58,7 @@ #include #include #include +#include #include #include @@ -637,6 +638,7 @@ asmlinkage void __init start_kernel(void) enable_debug_pagealloc(); cpu_hotplug_init(); kmem_cache_init(); + idr_init_cache(); setup_per_cpu_pageset(); numa_policy_init(); if (late_time_init) -- cgit v1.2.3-59-g8ed1b