Subject: kern/7797: Bug in FFSS mount root
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/16/1999 17:35:41
>Number:         7797
>Category:       kern
>Synopsis:       It's stuffed
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 16 17:35:00 1999
>Originator:     Neil Carson
>Release:        1.4
Pretty normal
System: NetBSD 1.4 NetBSD 1.4 (BAMBLEWEENY) #5: Tue May 18 02:16:13 PDT 1999 i386

	If falling back from FFS onto another FS during root mount,
	the root vnode doesn't get released thus causing the other
	root mounts to panic later on.
	Change mountroot in FFS to:

	 * Get vnodes for rootdev.
	if (bdevvp(rootdev, &rootvp))
		panic("ffs_mountroot: can't setup bdevvp's");

	if ((error = vfs_rootmountalloc(MOUNT_FFS, "root_device", &mp)))
		return (error);
	if ((error = ffs_mountfs(rootvp, mp, p)) != 0) {
		free(mp, M_MOUNT);
		return (error);