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>
This commit is contained in:
@@ -526,7 +526,7 @@ static void __init free_initrd(void)
|
||||
|
||||
#endif
|
||||
|
||||
void __init populate_rootfs(void)
|
||||
static int __init populate_rootfs(void)
|
||||
{
|
||||
char *err = unpack_to_rootfs(__initramfs_start,
|
||||
__initramfs_end - __initramfs_start, 0);
|
||||
@@ -544,7 +544,7 @@ void __init populate_rootfs(void)
|
||||
unpack_to_rootfs((char *)initrd_start,
|
||||
initrd_end - initrd_start, 0);
|
||||
free_initrd();
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
printk("it isn't (%s); looks like an initrd\n", err);
|
||||
fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700);
|
||||
@@ -565,4 +565,6 @@ void __init populate_rootfs(void)
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
rootfs_initcall(populate_rootfs);
|
||||
|
Reference in New Issue
Block a user