Do the right thing if bdevvp is called twice for the same device.
Obtained from: Poul-Henning Kamp <phk@freebsd.org>
This commit is contained in:
parent
55124436ab
commit
02a1e48f02
@ -1319,6 +1319,8 @@ bdevvp(dev, vpp)
|
||||
*vpp = NULLVP;
|
||||
return (ENXIO);
|
||||
}
|
||||
if (vfinddev(dev, VCHR, vpp))
|
||||
return (0);
|
||||
error = getnewvnode(VT_NON, (struct mount *)0, spec_vnodeop_p, &nvp);
|
||||
if (error) {
|
||||
*vpp = NULLVP;
|
||||
|
@ -1319,6 +1319,8 @@ bdevvp(dev, vpp)
|
||||
*vpp = NULLVP;
|
||||
return (ENXIO);
|
||||
}
|
||||
if (vfinddev(dev, VCHR, vpp))
|
||||
return (0);
|
||||
error = getnewvnode(VT_NON, (struct mount *)0, spec_vnodeop_p, &nvp);
|
||||
if (error) {
|
||||
*vpp = NULLVP;
|
||||
|
Loading…
x
Reference in New Issue
Block a user