lkml.org 
[lkml]   [1996]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[URGENT FIX] Re: kernel panic with initrd
Date
Gerd Knorr <kraxel@cs.tu-berlin.de> wrote:
> There is a bug somewhere in the initrd stuff. [...]

Indeed - I forgot to run fs_may_mount, which removes stale inodes as
a side-effect. Here's a patch to fix it (for pre-2.0.14):

--- linux/fs/super.c.orig Fri Jun 7 18:08:12 1996
+++ linux/fs/super.c Fri Jun 7 18:12:18 1996
@@ -1040,6 +1040,10 @@
old_root = current->fs->root;
old_pwd = current->fs->pwd;
old_root_dev = ROOT_DEV;
+ if (!fs_may_mount(new_root_dev)) {
+ printk(KERN_CRIT "New root is busy. Staying in initrd.\n");
+ return -EBUSY;
+ }
ROOT_DEV = new_root_dev;
do_mount_root();
old_fs = get_fs();
- Werner

--
_________________________________________________________________________
/ Werner Almesberger, DI-LRC,EPFL,CH werner.almesberger@lrc.di.epfl.ch /
/_IN_R_133__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.045 / U:5.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site