Revert my previous commit.
Proved I'm not that bright at times: jhb
This commit is contained in:
parent
e99662a623
commit
129518ec2c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user