fork: Move thread info gfp flags to header
[deliverable/linux.git] / kernel / fork.c
index b9372a0bff18c2a042cb4ef7f6d6ea7b25a3583c..5d22b9b8cf7b5f156ace2de279ff4a6ee6f9b133 100644 (file)
@@ -123,12 +123,8 @@ static struct kmem_cache *task_struct_cachep;
 static struct thread_info *alloc_thread_info_node(struct task_struct *tsk,
                                                  int node)
 {
-#ifdef CONFIG_DEBUG_STACK_USAGE
-       gfp_t mask = GFP_KERNEL | __GFP_ZERO;
-#else
-       gfp_t mask = GFP_KERNEL;
-#endif
-       struct page *page = alloc_pages_node(node, mask, THREAD_SIZE_ORDER);
+       struct page *page = alloc_pages_node(node, THREADINFO_GFP,
+                                            THREAD_SIZE_ORDER);
 
        return page ? page_address(page) : NULL;
 }
@@ -203,13 +199,7 @@ void __put_task_struct(struct task_struct *tsk)
 }
 EXPORT_SYMBOL_GPL(__put_task_struct);
 
-/*
- * macro override instead of weak attribute alias, to workaround
- * gcc 4.1.0 and 4.1.1 bugs with weak attribute and empty functions.
- */
-#ifndef arch_task_cache_init
-#define arch_task_cache_init()
-#endif
+void __init __weak arch_task_cache_init(void) { }
 
 void __init fork_init(unsigned long mempages)
 {
This page took 0.025163 seconds and 5 git commands to generate.