1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00

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
This commit is contained in:
Rick Macklem 2010-10-21 18:49:12 +00:00
parent a8af8b783a
commit 8a1b5ade5f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=214149

View File

@ -1933,7 +1933,15 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdgram,
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) {