svn commit: r220997 - stable/8/sys/fs/nfsserver

Rick Macklem rmacklem at FreeBSD.org
Sun Apr 24 19:35:54 UTC 2011


Author: rmacklem
Date: Sun Apr 24 19:35:54 2011
New Revision: 220997
URL: http://svn.freebsd.org/changeset/base/220997

Log:
  MFC: r220507
  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.

Modified:
  stable/8/sys/fs/nfsserver/nfs_nfsdport.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdport.c	Sun Apr 24 17:28:27 2011	(r220996)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c	Sun Apr 24 19:35:54 2011	(r220997)
@@ -1972,9 +1972,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) {


More information about the svn-src-stable-8 mailing list