Skip site navigation (1)Skip section navigation (2)
Date:      15 Jun 1999 10:45:48 +0300
From:      Ville-Pertti Keinonen <will@iki.fi>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        current@freebsd.org
Subject:   Re: NFS vnode reference issues on server
Message-ID:  <86d7yxoqj6.fsf@not.demophon.com>
In-Reply-To: Matthew Dillon's message of "15 Jun 1999 07:21:58 %2B0300"
References:  <199906150421.VAA14439@apollo.backplane.com.newsgate.clinet.fi>

next in thread | previous in thread | raw e-mail | index | archive | help

Matthew Dillon <dillon@apollo.backplane.com> writes:

>      Ok, something for people following the code to look over if they have 
>      the time.  This in nfs_subs.c, nfs_namei().  Question:  ndp->ni_vp 
>      is non-NULL and appears to be referenced as of the time a badlink
>      occurs, linklen is 0, or the link is too long.  Do we have to 
>      release ndp->ni_vp and NULL it out in this case?  I believe so.

Yes, and it would seem that you should also do this for the previous
error return (ELOOP).  There are no special cases for specific errors
so all exits with error conditions should behave identically.  Callers
bail out without doing anything further with the nameidata on errors,
apparently in all cases.

A reference to the directory vnode appears to be lost in most cases of
errors, as well (once again, the reference in the nameidata).  In
*some* cases, there is a reference in retdirp, but it's a different
reference.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86d7yxoqj6.fsf>