Use vget() for devices.
This commit is contained in:
parent
2e6e470fba
commit
7162b2c482
|
@ -34,7 +34,7 @@
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)kernfs_vnops.c 8.6 (Berkeley) 2/10/94
|
* from: @(#)kernfs_vnops.c 8.6 (Berkeley) 2/10/94
|
||||||
* $Id: kernfs_vnops.c,v 1.23 1994/06/08 11:33:21 mycroft Exp $
|
* $Id: kernfs_vnops.c,v 1.24 1994/06/15 03:30:44 mycroft Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -245,11 +245,12 @@ kernfs_lookup(ap)
|
||||||
|
|
||||||
if (kt->kt_tag == KTT_DEVICE) {
|
if (kt->kt_tag == KTT_DEVICE) {
|
||||||
dev_t *dp = kt->kt_data;
|
dev_t *dp = kt->kt_data;
|
||||||
|
loop:
|
||||||
if (*dp == NODEV || !vfinddev(*dp, kt->kt_vtype, &fvp))
|
if (*dp == NODEV || !vfinddev(*dp, kt->kt_vtype, &fvp))
|
||||||
return (ENXIO);
|
return (ENOENT);
|
||||||
*vpp = fvp;
|
*vpp = fvp;
|
||||||
VREF(fvp);
|
if (vget(fvp, 1))
|
||||||
VOP_LOCK(fvp);
|
goto loop;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue