BUG fix for initrd (1.3.74)

Hans Lermen (lermen@elserv.ffm.fgan.de)
Fri, 15 Mar 1996 16:27:35 +0100 (MET)


Hi Linus,

There is a bug in the initrd stuff, which is triggered when
CONFIG_BLK_DEV_INITRD is configured, but trying to use the normal
RAMdisk loading procedure from floppy (no initrd=xxx).

Here is a patch for 1.3.74 that fixes this.

Cheers,
Hans
<lermen@elserv.ffm.fgan.de>

-----------------------------------------------------------------------
--- linux-1.3.74-clean/init/main.c Thu Mar 14 21:10:00 1996
+++ linux/init/main.c Fri Mar 15 16:14:19 1996
@@ -794,6 +794,7 @@
real_root_dev = ROOT_DEV;
real_root_mountflags = root_mountflags;
if (initrd_start && mount_initrd) root_mountflags &= ~MS_RDONLY;
+ else mount_initrd =0;
#endif
setup();

@@ -823,7 +824,7 @@

#ifdef CONFIG_BLK_DEV_INITRD
root_mountflags = real_root_mountflags;
- if (ROOT_DEV != real_root_dev && ROOT_DEV == MKDEV(RAMDISK_MAJOR,0)) {
+ if (mount_initrd && ROOT_DEV != real_root_dev && ROOT_DEV == MKDEV(RAMDISK_MAJOR,0)) {
int error;

pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
-----------------------------------------------------------------------