Date: Tue, 10 Sep 2002 12:18:17 -0700 (PDT) From: Don Lewis <dl-freebsd@catspoiler.org> To: bde@zeta.org.au Cc: rwatson@FreeBSD.ORG, current@FreeBSD.ORG, jeff@FreeBSD.ORG Subject: Re: vnode lock assertion problem in nfs_link() Message-ID: <200209101918.g8AJIHwr095835@gw.catspoiler.org> In-Reply-To: <20020911000503.L1981-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11 Sep, Bruce Evans wrote: > On Tue, 10 Sep 2002, Don Lewis wrote: > > I have just one thing to add to Robert's reply. > >> BTW, is it safe to call ASSERT_VOP_UNLOCKED() in the SMP case after the >> reference has been dropped with vput() or vrele()? > > I think it is. It has some internal locking (v_interlock at least), and > only asserts that the vnode is unlocked by curthread so it doesn't matter > if another thread locks it. I'm mostly worried about the vnode being recycled as something else after the vput() or vrele() call. I think a better approach would be to add the assertion checks to vput() and vrele(), which would mean that we could remove most of the checks in the syscall code. The only problems we would miss would be when we leak vnode references, but reference leaks are a problem anyway. I wish there was a good way to add assertion checks for detecting the leaks. 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?200209101918.g8AJIHwr095835>