25-akpm/kernel/fork.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff -puN kernel/fork.c~unmap-page-debugging-fixes kernel/fork.c
--- 25/kernel/fork.c~unmap-page-debugging-fixes	Tue Apr 22 14:41:08 2003
+++ 25-akpm/kernel/fork.c	Tue Apr 22 14:41:08 2003
@@ -187,10 +187,18 @@ int autoremove_wake_function(wait_queue_
 void __init fork_init(unsigned long mempages)
 {
 	/* create a slab on which task_structs can be allocated */
+#ifdef CONFIG_DEBUG_PAGEALLOC
 	task_struct_cachep =
 		kmem_cache_create("task_struct",
-				  min(PAGE_SIZE, sizeof(struct task_struct)),0,
-				  SLAB_MUST_HWCACHE_ALIGN, NULL, NULL);
+			min((size_t)PAGE_SIZE, sizeof(struct task_struct)),
+			0, SLAB_MUST_HWCACHE_ALIGN, NULL, NULL);
+#else
+	task_struct_cachep =
+		kmem_cache_create("task_struct",
+			sizeof(struct task_struct),
+			0, SLAB_MUST_HWCACHE_ALIGN, NULL, NULL);
+#endif
+
 	if (!task_struct_cachep)
 		panic("fork_init(): cannot create task_struct SLAB cache");
 

_