]> Pileus Git - ~andy/linux/blobdiff - init/main.c
s390/headers: remove #ifdef __KERNEL__ from not exported headers
[~andy/linux] / init / main.c
index 92c47c4dbde85831f2701b56c5a31430d7231620..1ca6b32c482875cbfd90fb315831c4c110d28414 100644 (file)
@@ -560,9 +560,6 @@ asmlinkage void __init start_kernel(void)
        early_boot_irqs_disabled = false;
        local_irq_enable();
 
-       /* Interrupts are enabled now so all GFP allocations are safe. */
-       gfp_allowed_mask = __GFP_BITS_MASK;
-
        kmem_cache_init_late();
 
        /*
@@ -847,6 +844,10 @@ static int __init kernel_init(void * unused)
         * Wait until kthreadd is all set-up.
         */
        wait_for_completion(&kthreadd_done);
+
+       /* Now the scheduler is fully set up and can do blocking allocations */
+       gfp_allowed_mask = __GFP_BITS_MASK;
+
        /*
         * init can allocate pages on any node
         */