FWIW, works for me


On Fri, 28 Jul 2000, Poul-Henning Kamp wrote:

> 
> I'm in my beach-house and pretty offline right now, but I reviewed the
> change Kirk did to addaliasu() and found at least one scenario where
> it wouldn't do what he expected:
> 
> If bdevvp() is called more than once with the same dev_t we would
> create more than one anonymous vnode for that dev_t and addaliasu()
> would only get one of these in its yarn.  This patch makes bdevvp()
> only produce max one anonymous vnode per dev_t.
> 
> I don't know if the new rootfs-locating code calls bdevvp() more
> than once, if it doesn't this patch is a harmless bit of overhead.
> 
> Please test, and if it doesn't do any harm I will commit it.
> 
> (This does not fix the panic everybody is talking about btw)
> 
> Poul-Henning
> 
> 
> Index: vfs_subr.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/kern/vfs_subr.c,v
> retrieving revision 1.267
> diff -u -r1.267 vfs_subr.c
> --- vfs_subr.c        2000/07/24 05:28:29     1.267
> +++ vfs_subr.c        2000/07/28 19:08:36
> @@ -1276,6 +1276,8 @@
>               *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;
> --
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> [EMAIL PROTECTED]         | TCP/IP since RFC 956
> FreeBSD coreteam member | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
> 



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to