2.1.50 and initrd

Florian La Roche (florian@knorke.saar.de)
Fri, 15 Aug 1997 23:46:54 +0200


I have my scsi-module loaded from initrd. With 2.1.50, this currently
does not work:

do_change_root: old root d_count=17
Trying to unmount old root... Negative d_count (-1) for ///
Unabe to handle kernel NULL pointer dereference at virtual address 000000000

The functions involved:
the initrd stuff will call do_umount()
do_umount() will call d_umount()
d_umount calls dput(root), which will complain and segv

Should the following changes also be applied? (That part is not used for initrd,
so it doesn't make any difference for me... The real fix must be something
different.)
--- super.c 1997/08/15 21:14:51 1.1
+++ super.c 1997/08/15 21:43:30
@@ -607,8 +607,7 @@
*/
quota_off(dev, -1);
fsync_dev(dev);
- retval = do_remount_sb(sb, MS_RDONLY, 0);
- return retval;
+ return do_remount_sb(sb, MS_RDONLY, 0);
}
return 0;
}
@@ -1153,8 +1152,10 @@
umount_error = do_umount(old_root_dev,1);
if (umount_error) printk(KERN_ERR "error %d\n",umount_error);
else {
+ struct super_block * sb;
printk("okay\n");
- invalidate_buffers(old_root_dev);
+ if ((sb = get_super(old_root_dev)))
+ invalidate_buffers(sb);
}
return umount_error ? error : 0;
}