Fix the experimental NFS server so that it doesn't leak

a reference count on the directory when creating device
special files.

MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2011-01-03 00:40:13 +00:00
parent 81f78d997d
commit fa5ecdd3b9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216898

View file

@ -857,8 +857,7 @@ nfsvno_mknod(struct nameidata *ndp, struct nfsvattr *nvap, struct ucred *cred,
&ndp->ni_cnd, &nvap->na_vattr);
vput(ndp->ni_dvp);
nfsvno_relpathbuf(ndp);
if (error)
vrele(ndp->ni_startdir);
vrele(ndp->ni_startdir);
/*
* Since VOP_MKNOD returns the ni_vp, I can't
* see any reason to do the lookup.