From: Ben Kaduk Date: Mon, 20 Dec 2010 00:33:28 +0000 (-0500) Subject: FBSD7: Don't sleep with the glock X-Git-Tag: upstream/1.6.0.pre2^2~144 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9ae3974714d6d26711cfe59ed7bf5559c43a472b;p=packages%2Fo%2Fopenafs.git FBSD7: Don't sleep with the glock On FreeBSD 7.X, vinvalbuf() can (will) sleep; this results in a panic when the kernel is configured with WITNESS and we hold the glock around it. Drop the glock in this case. Reviewed-on: http://gerrit.openafs.org/3551 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b1cb3607ff66b7fc6201fab2af57761156b1927f) Change-Id: I3b22c12a20b33ca0e4df5a66c2edfc4167000a1c Reviewed-on: http://gerrit.openafs.org/3650 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 20ff3f5b0..90268871f 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -1645,7 +1645,9 @@ afs_GetVCache(struct VenusFid *afid, struct vrequest *areq, iheldthelock = VOP_ISLOCKED(vp, curthread); if (!iheldthelock) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curthread); + AFS_GUNLOCK(); vinvalbuf(vp, V_SAVE, curthread, PINOD, 0); + AFS_GLOCK(); if (!iheldthelock) VOP_UNLOCK(vp, LK_EXCLUSIVE, curthread); #elif defined(AFS_FBSD_ENV)