darwin-finalizevnode-get-vnode-inside-lock-20071017

FIXES 41550

the ovp initialization should happen while we have the vnode locked, regardless.
This commit is contained in:
Chaskiel M Grundman 2007-10-17 18:16:19 +00:00 committed by Derrick Brashear
parent eac13cbb48
commit 49630f2957

View File

@ -2061,12 +2061,13 @@ afs_darwin_getnewvnode(struct vcache *avc)
Don't touch! */
int
afs_darwin_finalizevnode(struct vcache *avc, struct vnode *dvp, struct componentname *cnp, int isroot) {
vnode_t ovp = AFSTOV(avc);
vnode_t ovp;
vnode_t nvp;
int error;
struct vnode_fsparam par;
AFS_GLOCK();
ObtainWriteLock(&avc->lock,325);
ovp = AFSTOV(avc);
if (!(avc->states & CDeadVnode) && vnode_vtype(ovp) != VNON) {
ReleaseWriteLock(&avc->lock);
AFS_GUNLOCK();