Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Oct 2010 18:49:12 +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: r214149 - head/sys/fs/nfsserver
Message-ID:  <201010211849.o9LInC4j099775@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Thu Oct 21 18:49:12 2010
New Revision: 214149
URL: http://svn.freebsd.org/changeset/base/214149

Log:
  Modify the experimental NFS server in a manner analagous to
  r214049 for the regular NFS server, so that it will not do
  a VOP_LOOKUP() of ".." when at the root of a file system
  when performing a ReaddirPlus RPC.
  
  MFC after:	10 days

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

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c	Thu Oct 21 18:30:48 2010	(r214148)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c	Thu Oct 21 18:49:12 2010	(r214149)
@@ -1933,7 +1933,15 @@ again:
 							vn_lock(vp,
 							    LK_EXCLUSIVE |
 							    LK_RETRY);
-						r = VOP_LOOKUP(vp, &nvp, &cn);
+						if ((vp->v_vflag & VV_ROOT) != 0
+						    && (cn.cn_flags & ISDOTDOT)
+						    != 0) {
+							vref(vp);
+							nvp = vp;
+							r = 0;
+						} else
+							r = VOP_LOOKUP(vp, &nvp,
+							    &cn);
 					}
 				}
 				if (!r) {



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