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) {
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to