From fec1aafc01a9fec64d5f9de6f5a3af4fe5c2067a Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sat, 26 Jun 1999 14:44:24 +0000 Subject: [PATCH] I'm tired of having a 'hanging root device'.. This isn't a "fix", just a workaround for a specific case where cam interrupts right in the middle of this printf. --- sys/kern/vfs_conf.c | 5 ++++- sys/kern/vfs_mount.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c index 665d52fc3524..c8ebca6d88dc 100644 --- a/sys/kern/vfs_conf.c +++ b/sys/kern/vfs_conf.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94 - * $Id: vfs_conf.c,v 1.27 1999/05/23 10:51:33 jb Exp $ + * $Id: vfs_conf.c,v 1.28 1999/05/24 00:37:26 jb Exp $ */ /* @@ -118,6 +118,7 @@ vfs_mountrootfs(void *unused) struct mount *mp; int err; struct proc *p = curproc; /* XXX */ + int s; int i; dev_t orootdev; @@ -146,7 +147,9 @@ vfs_mountrootfs(void *unused) break; rootdev = rootdevs[i]; if (rootdev != orootdev) { + s = splbio(); /* Overkill, but harmless.. */ printf("changing root device to %s\n", rootdevnames[i]); + splx(s); orootdev = rootdev; } strncpy(mp->mnt_stat.f_mntfromname, diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 665d52fc3524..c8ebca6d88dc 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94 - * $Id: vfs_conf.c,v 1.27 1999/05/23 10:51:33 jb Exp $ + * $Id: vfs_conf.c,v 1.28 1999/05/24 00:37:26 jb Exp $ */ /* @@ -118,6 +118,7 @@ vfs_mountrootfs(void *unused) struct mount *mp; int err; struct proc *p = curproc; /* XXX */ + int s; int i; dev_t orootdev; @@ -146,7 +147,9 @@ vfs_mountrootfs(void *unused) break; rootdev = rootdevs[i]; if (rootdev != orootdev) { + s = splbio(); /* Overkill, but harmless.. */ printf("changing root device to %s\n", rootdevnames[i]); + splx(s); orootdev = rootdev; } strncpy(mp->mnt_stat.f_mntfromname,