From owner-freebsd-hackers Thu Dec 27 11:38:33 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id F123637B405; Thu, 27 Dec 2001 11:38:31 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id fBRJcVH59048; Thu, 27 Dec 2001 11:38:31 -0800 (PST) (envelope-from dillon) Date: Thu, 27 Dec 2001 11:38:31 -0800 (PST) From: Matthew Dillon Message-Id: <200112271938.fBRJcVH59048@apollo.backplane.com> To: hackers@freebsd.org Cc: re@freebsd.org Subject: More NFS fixes - patchset. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This patchset fixes a race in the nfs_node code. Basically the issue is that it is possible for the nfsnode (and the vnode) to get ripped out from under us if vget() sleeps, so we have to retry the operation. I'd like to MFC this one to -stable. -Matt Matthew Dillon Index: nfs/nfs_node.c =================================================================== RCS file: /home/ncvs/src/sys/nfs/Attic/nfs_node.c,v retrieving revision 1.36.2.2 diff -u -r1.36.2.2 nfs_node.c --- nfs/nfs_node.c 26 Jun 2001 04:20:10 -0000 1.36.2.2 +++ nfs/nfs_node.c 27 Dec 2001 19:27:09 -0000 @@ -115,7 +115,7 @@ bcmp((caddr_t)fhp, (caddr_t)np->n_fhp, fhsize)) continue; vp = NFSTOV(np); - if (vget(vp, LK_EXCLUSIVE, p)) + if (vget(vp, LK_EXCLUSIVE|LK_SLEEPFAIL, p)) goto loop; *npp = np; return(0); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message