Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Nov 2010 01:55:15 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r214614 - stable/8/sys/fs/nfsserver
Message-ID:  <201011010155.oA11tF4G019948@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Mon Nov  1 01:55:15 2010
New Revision: 214614
URL: http://svn.freebsd.org/changeset/base/214614

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

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)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdport.c	Mon Nov  1 01:51:47 2010	(r214613)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c	Mon Nov  1 01:55:15 2010	(r214614)
@@ -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?201011010155.oA11tF4G019948>