mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
revert "initramfs: cleanup incomplete rootfs"
Revertff1522bb7d("initramfs: cleanup incomplete rootfs"). Andy reports : This breaks my setup where I have U-boot provided more size of initramfs : than needed. This allows a bit of flexibility to increase or decrease : initramfs compressed image without taking care of bootloader. The proper : solution is to do this if we sure that we didn't get enough memory, : otherwise I can't consider the error fatal to clean up rootfs. Fixes:ff1522bb7d("initramfs: cleanup incomplete rootfs") Reported-by: Andy Shevchenko <[email protected]> Tested-by: Andy Shevchenko <[email protected]> Cc: David Engraf <[email protected]> Cc: Dominik Brodowski <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Philippe Ombredanne <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Luc Van Oostenryck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
2137397c92
commit
a841c673f1
1 file changed
+3
-3
+3
-3
@@ -550,6 +550,7 @@ skip:
|
||||
initrd_end = 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_RAM
|
||||
#define BUF_SIZE 1024
|
||||
static void __init clean_rootfs(void)
|
||||
{
|
||||
@@ -596,6 +597,7 @@ static void __init clean_rootfs(void)
|
||||
ksys_close(fd);
|
||||
kfree(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int __init populate_rootfs(void)
|
||||
{
|
||||
@@ -638,10 +640,8 @@ static int __init populate_rootfs(void)
|
||||
printk(KERN_INFO "Unpacking initramfs...\n");
|
||||
err = unpack_to_rootfs((char *)initrd_start,
|
||||
initrd_end - initrd_start);
|
||||
if (err) {
|
||||
if (err)
|
||||
printk(KERN_EMERG "Initramfs unpacking failed: %s\n", err);
|
||||
clean_rootfs();
|
||||
}
|
||||
free_initrd();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user