2.1.78-1 nfs-root problems and patch
DAVID BALAZIC (david.balazic@uni-mb.si)
Mon, 12 Jan 1998 19:53:00 +0100 (MET)
The path for may last post :
--- linux/fs/super.c Mon Dec 22 02:31:17 1997
+++ /tmp/linux-2.1.79-1/fs/super.c Mon Jan 12 18:35:44 1998
@@ -1058,16 +1058,29 @@
struct inode * d_inode = NULL;
struct file filp;
int retval;
-
+
+
#ifdef CONFIG_ROOT_NFS
if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) {
ROOT_DEV = 0;
if ((fs_type = get_fs_type("nfs"))) {
if ((vfsmnt = add_vfsmnt(ROOT_DEV, "/dev/root", "/")))
{
- sb = vfsmnt->mnt_sb;
+ /*
+ sb = vfsmnt->mnt_sb;
+ * sb is NULL here !!!!!
+ * I took the following two lines from
linux-2.0.33/fs/super.c
+ * I have no idea if it is he correct solution,
but it works for me.
+ * David.Balazic@uni-mb.si
+ */
+ sb = &super_blocks[0];
+ while (sb->s_dev) sb++;
+ /* now we have sb and copy it to vfsmnt
structure */
+ vfsmnt->mnt_sb = sb;
+
sb->s_dev = get_unnamed_dev();
sb->s_flags = root_mountflags & ~MS_RDONLY;
if (nfs_root_mount(sb) >= 0) {
------------------------------------------------------------------------
--
David Balazic , student
E-mail: David.Balazic@uni-mb.si | sLOVEnija
http://www.uni-mb.si/~uel003r2a
Computer: Amiga 1200 + Quantum LPS-340AT
--