Fix locking in FlushVCBs when called from discon
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Mon, 9 Nov 2009 23:20:14 +0000 (23:20 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Tue, 10 Nov 2009 13:03:17 +0000 (05:03 -0800)
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 <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/afs/afs_vcache.c

index 899cdf8..7c4ee99 100644 (file)
@@ -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);
 }
 
 /*!