openbsd-deadlock-fix-20031010

release global lock when calling getnewvnode
thanks to wollman@khavrinen.lcs.mit.edu for finding this
This commit is contained in:
Jim Rees 2003-10-10 21:01:56 +00:00
parent 5f705ff1b9
commit 7e554cf673

View File

@ -928,7 +928,9 @@ afs_NewVCache(struct VenusFid *afid, struct server *serverp)
tvc->v.v_vm_info->pager = MEMORY_OBJECT_NULL; tvc->v.v_vm_info->pager = MEMORY_OBJECT_NULL;
#endif /* AFS_MACH_ENV */ #endif /* AFS_MACH_ENV */
#ifdef AFS_OBSD_ENV #ifdef AFS_OBSD_ENV
AFS_GUNLOCK();
afs_nbsd_getnewvnode(tvc); /* includes one refcount */ afs_nbsd_getnewvnode(tvc); /* includes one refcount */
AFS_GLOCK();
lockinit(&tvc->rwlock, PINOD, "vcache", 0, 0); lockinit(&tvc->rwlock, PINOD, "vcache", 0, 0);
#endif #endif
tvc->parentVnode = 0; tvc->parentVnode = 0;