initramfs: cleanup initrd freeing

Factor the kexec logic into a separate helper, and then inline the rest of
free_initrd into the only caller.

Signed-off-by: Christoph Hellwig <>
Acked-by: Mike Rapoport <>
Cc: Catalin Marinas <>	[arm64]
Cc: Geert Uytterhoeven <>	[m68k]
Cc: Steven Price <>
Cc: Alexander Viro <>
Cc: Guan Xuetao <>
Cc: Russell King <>
Cc: Will Deacon <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
1 file changed