summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2010-10-21 18:49:12 +0000
committerrmacklem <rmacklem@FreeBSD.org>2010-10-21 18:49:12 +0000
commit4b34442e9b2aa3f9efb8b4df67a1e6fcbb2d8c4a (patch)
tree7b5bc82f87ea752e1b5f94887f871142a76519e0 /sys/fs
parent9c458fa0647c39ac5b4cd52993c1c23afc0fd2b5 (diff)
downloadFreeBSD-src-4b34442e9b2aa3f9efb8b4df67a1e6fcbb2d8c4a.zip
FreeBSD-src-4b34442e9b2aa3f9efb8b4df67a1e6fcbb2d8c4a.tar.gz
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
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 5e50d3e..0d35d1d 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -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) {
OpenPOWER on IntegriCloud