Skip to contentSkip to conversation

Make clean_rootfs()'s existence dependent on CONFIG_BLK_DEV_RAM

PATCH New David Howells 1 participant 1 message Apr 9, 2009 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make clean_rootfs()'s existence dependent on CONFIG_BLK_DEV_RAM

Make clean_rootfs()'s existence dependent on CONFIG_BLK_DEV_RAM as it's only called if that is 'y'.

---

 init/initramfs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
init/initramfs.c +2 -0
index 80cd713..e44f2d9 100644
@@ -515,6 +515,7 @@ skip:
 	initrd_end = 0;
 }
 
+#ifdef CONFIG_BLK_DEV_RAM
 #define BUF_SIZE 1024
 static void __init clean_rootfs(void)
 {
@@ -561,6 +562,7 @@ static void __init clean_rootfs(void)
 	sys_close(fd);
 	kfree(buf);
 }
+#endif
 
 static int __init populate_rootfs(void)
 {