I don't see any reference to you calling vrele or vput. Without that the
reference count won't be decreased and the vnode will continue to be locked for 
all other callers.

=========================================================================
For RAIDANT status see: 
http://cranford.eng.netapp.com:8015/ant3/index.cgi
To submit RAIDANT test descriptions go to:
http://web.netapp.com/engineering/projects/raidv2/testing/ 
Ontap on the web:
http://web.netapp.com/engineering/projects/raidv2/testing/global/ 

On Mon, 11 Feb 2002, [ISO-8859-2] Paweł Jakub Dawidek wrote:

> Hi.
> 
> I got problem with namei(9) and some devices.
> Example (catching syscall open()):
> static int
> n_open(register struct proc *p, register struct open_args *ea)
> {
> [...]
>       long finode = 0;
>       struct nameidata nd, *ndptr;
> [...]
>       ndptr = &nd;
>       NDINIT(ndptr, LOOKUP, FOLLOW | SAVENAME, UIO_USERSPACE, ea->path, p);
>       if (!namei(ndptr))
>               if (!VOP_GETATTR(ndptr->ni_vp, &va, p->p_ucred, p))
>                       finode = va.va_fileid;
> [...]
> }
> 
> I use namei() coz i want file inode.
> But when namei() will be called some devices are blocking.
> For example if I do in this way:
> [...]
>       return open(p, ea);
>       if (!namei(ndptr))
> [...]
> Everything is oke, but:
>       namei(ndptr)
>       return open(p, ea);
> isn't.
> % mpg123 some.mp3
> Can't open /dev/dsp!
> 
> And /dev/dsp is completely fucked up, it is still busy even if I unload my
> module. Only reboot can free it.
> 
> So what's going on?
> Or maybe there is some other way to get file inode?
> 
> -- 
> Paweł Jakub Dawidek
> Network Administrator.
> Am I Evil? Yes, I Am.
> 


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

Reply via email to