mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
ANDROID: initramfs: call free_initrd() when skipping init
Memory allocated for initrd would not be reclaimed if initializing ramfs was skipped. Bug: 69901741 Test: "grep MemTotal /proc/meminfo" increases by a few MB on an Android device with a/b boot. Change-Id: Ifbe094d303ed12cfd6de6aa004a8a19137a2f58a Signed-off-by: Nick Bray <ncbray@google.com> Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
parent
79f3326944
commit
008704c50f
|
|
@ -631,8 +631,11 @@ static int __init populate_rootfs(void)
|
|||
{
|
||||
char *err;
|
||||
|
||||
if (do_skip_initramfs)
|
||||
if (do_skip_initramfs) {
|
||||
if (initrd_start)
|
||||
free_initrd();
|
||||
return default_rootfs();
|
||||
}
|
||||
|
||||
/* Load the built in initramfs */
|
||||
err = unpack_to_rootfs(__initramfs_start, __initramfs_size);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user