Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Dec 2001 11:38:31 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        hackers@freebsd.org
Cc:        re@freebsd.org
Subject:   More NFS fixes - patchset.
Message-ID:  <200112271938.fBRJcVH59048@apollo.backplane.com>

next in thread | raw e-mail | index | archive | help
    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 
					<dillon@backplane.com>

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




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