diff options
author | phk <phk@FreeBSD.org> | 2004-03-11 16:33:11 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-03-11 16:33:11 +0000 |
commit | eeb7579130ee3380d0348cb447d9c484c6c4b45e (patch) | |
tree | 208435a2d9319871f8e0f6d3c8d389050ba3446e /sys/kern | |
parent | b4f24d501388e451effb83554929f95bd6883301 (diff) | |
download | FreeBSD-src-eeb7579130ee3380d0348cb447d9c484c6c4b45e.zip FreeBSD-src-eeb7579130ee3380d0348cb447d9c484c6c4b45e.tar.gz |
Remove unused second arg to vfinddev().
Don't call addaliasu() on VBLK nodes.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_subr.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 0a6f4f9..2849cf9 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1756,8 +1756,9 @@ bdevvp(dev, vpp) *vpp = NULLVP; return (ENXIO); } - if (vfinddev(dev, VCHR, vpp)) + if (vfinddev(dev, vpp)) return (0); + error = getnewvnode("none", (struct mount *)0, spec_vnodeop_p, &nvp); if (error) { *vpp = NULLVP; @@ -1813,7 +1814,7 @@ addaliasu(nvp, nvp_rdev) * discard the newly created vnode rather than leaving the * bdevvp vnode lying around with no associated filesystem. */ - if (vfinddev(dev, nvp->v_type, &ovp) == 0 || ovp->v_data != NULL) { + if (vfinddev(dev, &ovp) == 0 || ovp->v_data != NULL) { addalias(nvp, dev); return (nvp); } @@ -2626,20 +2627,17 @@ vgonel(vp, td) * Lookup a vnode by device number. */ int -vfinddev(dev, type, vpp) +vfinddev(dev, vpp) dev_t dev; - enum vtype type; struct vnode **vpp; { struct vnode *vp; mtx_lock(&spechash_mtx); SLIST_FOREACH(vp, &dev->si_hlist, v_specnext) { - if (type == vp->v_type) { - *vpp = vp; - mtx_unlock(&spechash_mtx); - return (1); - } + *vpp = vp; + mtx_unlock(&spechash_mtx); + return (1); } mtx_unlock(&spechash_mtx); return (0); |