From b1cb3607ff66b7fc6201fab2af57761156b1927f Mon Sep 17 00:00:00 2001 From: Ben Kaduk Date: Sun, 19 Dec 2010 19:33:28 -0500 Subject: [PATCH] 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. Change-Id: I0036aad3059805d77afe9aa9bf7f5d421d6810f8 Reviewed-on: http://gerrit.openafs.org/3551 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/afs/afs_vcache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 26ed2c2be2..8502d6a530 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -1646,7 +1646,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)