From owner-freebsd-current Tue Sep 10 12:18:32 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBBAA37B400; Tue, 10 Sep 2002 12:18:27 -0700 (PDT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52A7843E42; Tue, 10 Sep 2002 12:18:27 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.5/8.12.5) with ESMTP id g8AJIHwr095835; Tue, 10 Sep 2002 12:18:21 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Message-Id: <200209101918.g8AJIHwr095835@gw.catspoiler.org> Date: Tue, 10 Sep 2002 12:18:17 -0700 (PDT) From: Don Lewis Subject: Re: vnode lock assertion problem in nfs_link() To: bde@zeta.org.au Cc: rwatson@FreeBSD.ORG, current@FreeBSD.ORG, jeff@FreeBSD.ORG In-Reply-To: <20020911000503.L1981-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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