diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-11 15:12:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-11 15:12:04 -0500 |
commit | 8d610dd52dd1da696e199e4b4545f33a2a5de5c6 (patch) | |
tree | 8b2eee4dac34ff5f1374225ccba3fedb8432b579 /init | |
parent | 8993780a6e44fb4e7ed34e33458506a775356c6e (diff) |
Make sure we populate the initroot filesystem late enough
We should not initialize rootfs before all the core initializers have
run. So do it as a separate stage just before starting the regular
driver initializers.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/initramfs.c | 6 | ||||
-rw-r--r-- | init/main.c | 7 |
2 files changed, 4 insertions, 9 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index 85f04037ade1..4fa0f7977de1 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -526,7 +526,7 @@ static void __init free_initrd(void) | |||
526 | 526 | ||
527 | #endif | 527 | #endif |
528 | 528 | ||
529 | void __init populate_rootfs(void) | 529 | static int __init populate_rootfs(void) |
530 | { | 530 | { |
531 | char *err = unpack_to_rootfs(__initramfs_start, | 531 | char *err = unpack_to_rootfs(__initramfs_start, |
532 | __initramfs_end - __initramfs_start, 0); | 532 | __initramfs_end - __initramfs_start, 0); |
@@ -544,7 +544,7 @@ void __init populate_rootfs(void) | |||
544 | unpack_to_rootfs((char *)initrd_start, | 544 | unpack_to_rootfs((char *)initrd_start, |
545 | initrd_end - initrd_start, 0); | 545 | initrd_end - initrd_start, 0); |
546 | free_initrd(); | 546 | free_initrd(); |
547 | return; | 547 | return 0; |
548 | } | 548 | } |
549 | printk("it isn't (%s); looks like an initrd\n", err); | 549 | printk("it isn't (%s); looks like an initrd\n", err); |
550 | fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700); | 550 | fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700); |
@@ -565,4 +565,6 @@ void __init populate_rootfs(void) | |||
565 | #endif | 565 | #endif |
566 | } | 566 | } |
567 | #endif | 567 | #endif |
568 | return 0; | ||
568 | } | 569 | } |
570 | rootfs_initcall(populate_rootfs); | ||
diff --git a/init/main.c b/init/main.c index fcd9ddc3ccf5..e3f0bb20b4dd 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -94,7 +94,6 @@ extern void pidmap_init(void); | |||
94 | extern void prio_tree_init(void); | 94 | extern void prio_tree_init(void); |
95 | extern void radix_tree_init(void); | 95 | extern void radix_tree_init(void); |
96 | extern void free_initmem(void); | 96 | extern void free_initmem(void); |
97 | extern void populate_rootfs(void); | ||
98 | extern void driver_init(void); | 97 | extern void driver_init(void); |
99 | extern void prepare_namespace(void); | 98 | extern void prepare_namespace(void); |
100 | #ifdef CONFIG_ACPI | 99 | #ifdef CONFIG_ACPI |
@@ -745,12 +744,6 @@ static int init(void * unused) | |||
745 | 744 | ||
746 | cpuset_init_smp(); | 745 | cpuset_init_smp(); |
747 | 746 | ||
748 | /* | ||
749 | * Do this before initcalls, because some drivers want to access | ||
750 | * firmware files. | ||
751 | */ | ||
752 | populate_rootfs(); | ||
753 | |||
754 | do_basic_setup(); | 747 | do_basic_setup(); |
755 | 748 | ||
756 | /* | 749 | /* |