patch-pre2.0.14-final2.0 linux/fs/super.c

Next file: linux/include/asm-alpha/unistd.h
Previous file: linux/fs/nfs/bio.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.14/linux/fs/super.c linux/fs/super.c
@@ -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();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this