openbsd-deadlock-fix-20031010
authorJim Rees <rees@umich.edu>
Fri, 10 Oct 2003 21:01:56 +0000 (21:01 +0000)
committerJim Rees <rees@umich.edu>
Fri, 10 Oct 2003 21:01:56 +0000 (21:01 +0000)
release global lock when calling getnewvnode
thanks to wollman@khavrinen.lcs.mit.edu for finding this

src/afs/afs_vcache.c

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