darwin-avoid-fsref-panic-maybe-20070728

maybe this works.
This commit is contained in:
Derrick Brashear 2007-07-28 15:31:44 +00:00
parent 840ad12eb3
commit a608cd2e24

View File

@ -2096,11 +2096,13 @@ afs_darwin_finalizevnode(struct vcache *avc, struct vnode *dvp, struct component
par.vnfs_markroot = 1; par.vnfs_markroot = 1;
error = vnode_create(VNCREATE_FLAVOR, VCREATESIZE, &par, &nvp); error = vnode_create(VNCREATE_FLAVOR, VCREATESIZE, &par, &nvp);
if (!error) { if (!error) {
vnode_addfsref(nvp); vnode_addfsref(nvp);
avc->v = nvp; avc->v = nvp;
avc->states &=~ CDeadVnode; avc->states &=~ CDeadVnode;
vnode_clearfsnode(ovp); if (!(avc->states & CVInit)) {
vnode_removefsref(ovp); vnode_clearfsnode(ovp);
vnode_removefsref(ovp);
}
} }
AFS_GLOCK(); AFS_GLOCK();
ReleaseWriteLock(&avc->lock); ReleaseWriteLock(&avc->lock);