Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jul 2009 23:10:23 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r195704 - head/sys/fs/nfsclient
Message-ID:  <200907142310.n6ENANZS074108@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Tue Jul 14 23:10:23 2009
New Revision: 195704
URL: http://svn.freebsd.org/changeset/base/195704

Log:
  Fix the experimental nfs client so that it does not cause a
  "share->excl" panic when doing a lookup of dotdot at the root
  of a server's file system. The patch avoids calling vn_lock()
  for that case, since nfscl_nget() has already acquired a lock
  for the vnode.
  
  Approved by:	re (kensmith), kib (mentor)

Modified:
  head/sys/fs/nfsclient/nfs_clvnops.c

Modified: head/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvnops.c	Tue Jul 14 22:54:29 2009	(r195703)
+++ head/sys/fs/nfsclient/nfs_clvnops.c	Tue Jul 14 23:10:23 2009	(r195704)
@@ -1127,7 +1127,8 @@ nfs_lookup(struct vop_lookup_args *ap)
 		if (error == 0)
 			newvp = NFSTOV(np);
 		vfs_unbusy(mp);
-		vn_lock(dvp, ltype | LK_RETRY);
+		if (newvp != dvp)
+			vn_lock(dvp, ltype | LK_RETRY);
 		if (dvp->v_iflag & VI_DOOMED) {
 			if (error == 0) {
 				if (newvp == dvp)



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