From owner-freebsd-current Tue Jun 15 0:48:17 1999 Delivered-To: freebsd-current@freebsd.org Received: from ns.oeno.com (ns.oeno.com [194.100.99.145]) by hub.freebsd.org (Postfix) with SMTP id 18E9614EE4 for ; Tue, 15 Jun 1999 00:48:13 -0700 (PDT) (envelope-from will@ns.oeno.com) Received: (qmail 2981 invoked by uid 1001); 15 Jun 1999 07:48:11 -0000 To: Matthew Dillon Cc: current@freebsd.org Subject: Re: NFS vnode reference issues on server References: <199906150421.VAA14439@apollo.backplane.com.newsgate.clinet.fi> From: Ville-Pertti Keinonen Date: 15 Jun 1999 10:45:48 +0300 In-Reply-To: Matthew Dillon's message of "15 Jun 1999 07:21:58 +0300" Message-ID: <86d7yxoqj6.fsf@not.demophon.com> Lines: 19 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matthew Dillon 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