Revert my previous commit.

Proved I'm not that bright at times:	jhb
This commit is contained in:
Tom Rhodes 2006-01-23 21:06:22 +00:00
parent e99662a623
commit 129518ec2c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154737

View File

@ -525,6 +525,10 @@ nfsrv_lookup(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
NFSD_UNLOCK();
mtx_lock(&Giant); /* VFS */
if (error) {
if (dirp) {
vrele(dirp);
dirp = NULL;
}
mtx_unlock(&Giant); /* VFS */
NFSD_LOCK();
nfsm_reply(NFSX_POSTOPATTR(v3));
@ -595,6 +599,11 @@ nfsrv_lookup(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
}
}
if (dirp) {
vrele(dirp);
dirp = NULL;
}
/*
* Resources at this point:
* ndp->ni_vp may not be NULL
@ -655,6 +664,8 @@ nfsrv_lookup(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
NFSD_LOCK_ASSERT();
NFSD_UNLOCK();
mtx_lock(&Giant); /* VFS */
if (dirp)
vrele(dirp);
NDFREE(&nd, NDF_ONLY_PNBUF);
if (ndp->ni_startdir)
vrele(ndp->ni_startdir);