From: Simon Wilkinson Date: Mon, 9 Nov 2009 23:20:14 +0000 (+0000) Subject: Fix locking in FlushVCBs when called from discon X-Git-Tag: openafs-devel-1_5_67~73 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c9197a1f32f3ba69b4c609726532977324dabd7b;p=packages%2Fo%2Fopenafs.git Fix locking in FlushVCBs when called from discon The disconnected code doesn't request locking from FlushVCBs when it calls it, but also doesn't hold the required locks itself. Fix this. Change-Id: I2450df4b19b2d44dca80990197e5e7637c9c8334 Reviewed-on: http://gerrit.openafs.org/802 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 899cdf8c6..7c4ee9979 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -3265,11 +3265,10 @@ afs_DisconGiveUpCallbacks(void) { } } } - /*printf("%d callbacks to be discarded. queued ... ", nq);*/ - afs_FlushVCBs(0); - + ReleaseWriteLock(&afs_xvcache); - /*printf("gone\n");*/ + + afs_FlushVCBs(1); } /*!