[PATCH] 2.0.35/36pre16 UMSDOS/initrd

Florian Lohoff (flo@quit.mediaways.net)
Mon, 2 Nov 1998 23:38:25 +0100


--W/nzBZO5zC0uMSeA
Content-Type: text/plain; charset=us-ascii

Hi,
after i (re)discovered the old umsdos initrd bug and finding it very anoying.
I did some hacking (first time in kernel space) and i think i have
a patch for this problem which solves the problems with the unoff patch
not able to build umsdos as a module anymore ... It might by VERY dirty
but someone else with more knowledge of the kernel might take a look.
Id like to see this in 2.0.36 (Hi Alan :) )

Patch -> Attachment

Flo

-- 
Florian.Lohoff@mediaWays.net			+49-5241-80-7085
Good, Fast, Cheap: Pick any two (you can't have all three). (RFC 1925)

--W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="umsdos-initrd.patch"

diff -u -r -P linux-2.0.36pre16/fs/super.c linux-2.0.36pre16-umsdos/fs/super.c --- linux-2.0.36pre16/fs/super.c Mon Nov 2 23:08:54 1998 +++ linux-2.0.36pre16-umsdos/fs/super.c Mon Nov 2 23:16:37 1998 @@ -1025,6 +1025,13 @@ sb->s_flags = root_mountflags; current->fs->pwd = inode; current->fs->root = inode; +#ifdef CONFIG_UMSDOS_FS + if ((strcmp(fs_type->name,"umsdos") == 0) && sb->s_mounted->i_mount) { + current->fs->pwd = sb->s_mounted->i_mount; + current->fs->root = sb->s_mounted->i_mount; + sb->s_mounted->i_mount=NULL; + } +#endif printk ("VFS: Mounted root (%s filesystem)%s.\n", fs_type->name, (sb->s_flags & MS_RDONLY) ? " readonly" : ""); diff -u -r -P linux-2.0.36pre16/fs/umsdos/inode.c linux-2.0.36pre16-umsdos/fs/umsdos/inode.c --- linux-2.0.36pre16/fs/umsdos/inode.c Mon Jul 13 22:47:38 1998 +++ linux-2.0.36pre16-umsdos/fs/umsdos/inode.c Mon Nov 2 23:15:39 1998 @@ -409,7 +409,7 @@ PRINTK (("umsdos_read_super %p\n",sb->s_mounted)); umsdos_setup_dir_inode (sb->s_mounted); PRINTK (("End umsdos_read_super\n")); - if (s == super_blocks){ + if (s->s_dev == ROOT_DEV){ /* #Specification: pseudo root / mount When a umsdos fs is mounted, a special handling is done if it is the root partition. We check for the presence @@ -479,6 +479,7 @@ umsdos_setup_dir_inode (pseudo); Printk (("Activating pseudo root /%s\n",UMSDOS_PSDROOT_NAME)); pseudo_root = pseudo; + sb->s_mounted->i_mount=pseudo; pseudo->i_count++; pseudo = NULL; } diff -u -r -P linux-2.0.36pre16/init/main.c linux-2.0.36pre16-umsdos/init/main.c --- linux-2.0.36pre16/init/main.c Mon Nov 2 23:08:56 1998 +++ linux-2.0.36pre16-umsdos/init/main.c Mon Nov 2 19:52:49 1998 @@ -1059,21 +1059,6 @@ smp_begin(); #endif - #ifdef CONFIG_UMSDOS_FS - { - /* - When mounting a umsdos fs as root, we detect - the pseudo_root (/linux) and initialise it here. - pseudo_root is defined in fs/umsdos/inode.c - */ - extern struct inode *pseudo_root; - if (pseudo_root != NULL){ - current->fs->root = pseudo_root; - current->fs->pwd = pseudo_root; - } - } - #endif - #ifdef CONFIG_BLK_DEV_INITRD root_mountflags = real_root_mountflags; if (mount_initrd && ROOT_DEV != real_root_dev && ROOT_DEV == MKDEV(RAMDISK_MAJOR,0)) {

--W/nzBZO5zC0uMSeA--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/