Oops, rev.1.167 made the device number checking in bdevvp() too strict

for mfs root mounts.  Don't require major 255 to be in bdevsw[].
This commit is contained in:
bde 1998-10-29 11:50:32 +00:00
parent 042df0ac22
commit 9a84781068
2 changed files with 8 additions and 6 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
* $Id: vfs_subr.c,v 1.169 1998/10/26 08:07:00 bde Exp $
* $Id: vfs_subr.c,v 1.170 1998/10/29 09:51:27 peter Exp $
*/
/*
@ -1112,8 +1112,9 @@ bdevvp(dev, vpp)
struct vnode *nvp;
int error;
if (dev == NODEV || major(dev) >= nblkdev ||
bdevsw[major(dev)] == NULL) {
/* XXX 255 is for mfs. */
if (dev == NODEV || (major(dev) != 255 && (major(dev) >= nblkdev ||
bdevsw[major(dev)] == NULL))) {
*vpp = NULLVP;
return (ENXIO);
}

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
* $Id: vfs_subr.c,v 1.169 1998/10/26 08:07:00 bde Exp $
* $Id: vfs_subr.c,v 1.170 1998/10/29 09:51:27 peter Exp $
*/
/*
@ -1112,8 +1112,9 @@ bdevvp(dev, vpp)
struct vnode *nvp;
int error;
if (dev == NODEV || major(dev) >= nblkdev ||
bdevsw[major(dev)] == NULL) {
/* XXX 255 is for mfs. */
if (dev == NODEV || (major(dev) != 255 && (major(dev) >= nblkdev ||
bdevsw[major(dev)] == NULL))) {
*vpp = NULLVP;
return (ENXIO);
}