Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Apr 2011 23:55:27 +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: r220507 - head/sys/fs/nfsserver
Message-ID:  <201104092355.p39NtRcE028790@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sat Apr  9 23:55:27 2011
New Revision: 220507
URL: http://svn.freebsd.org/changeset/base/220507

Log:
  Add a VOP_UNLOCK() for the directory, when that is not what
  VOP_LOOKUP() returned. This fixes a bug in the experimental
  NFS server for the case where VFS_VGET() fails returning EOPNOTSUPP
  in the ReaddirPlus RPC, forcing the use of VOP_LOOKUP() instead.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsserver/nfs_nfsdport.c

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c	Sat Apr  9 21:40:48 2011	(r220506)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c	Sat Apr  9 23:55:27 2011	(r220507)
@@ -1975,9 +1975,13 @@ again:
 							vref(vp);
 							nvp = vp;
 							r = 0;
-						} else
+						} else {
 							r = VOP_LOOKUP(vp, &nvp,
 							    &cn);
+							if (vp != nvp)
+								VOP_UNLOCK(vp,
+								    0);
+						}
 					}
 				}
 				if (!r) {



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