From ce7c2716522342c83c8c647bd8ea818a24cf516d Mon Sep 17 00:00:00 2001 From: Chaskiel M Grundman Date: Wed, 17 Oct 2007 18:19:02 +0000 Subject: [PATCH] STABLE14-darwin-finalizevnode-get-vnode-inside-lock-20071017 FIXES 41550 the ovp initialization should happen while we have the vnode locked, regardless. (cherry picked from commit 49630f29571b5d602e8d57aa1b48e3fe710e2a53) --- src/afs/DARWIN/osi_vnodeops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/afs/DARWIN/osi_vnodeops.c b/src/afs/DARWIN/osi_vnodeops.c index 7e8b2a97b9..4b5cc8bbec 100644 --- a/src/afs/DARWIN/osi_vnodeops.c +++ b/src/afs/DARWIN/osi_vnodeops.c @@ -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();