Windows: AFSExamineVolume drop TreeLock if waiters

After each call to AFSExamineObject drop the ObjectInfoTree.TreeLock
if there are threads waiting for access.  The garbage collection process
should not delay real work.

Change-Id: I2bd009d71b534d92d7e1b321b6db2204643e4666
Reviewed-on: http://gerrit.openafs.org/9786
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
Jeffrey Altman 2013-04-13 01:57:56 -04:00
parent a6037b153d
commit 5952cc139c

View File

@ -1636,6 +1636,15 @@ AFSExamineVolume( IN AFSVolumeCB *pVolumeCB)
AFSExamineObjectInfo( pCurrentObject, bVolumeObject, &bReleaseVolumeTreeLock);
if ( bReleaseVolumeTreeLock == TRUE &&
( ExGetExclusiveWaiterCount( pVolumeCB->ObjectInfoTree.TreeLock) > 0 ||
ExGetSharedWaiterCount( pVolumeCB->ObjectInfoTree.TreeLock) > 0))
{
AFSReleaseResource( pVolumeCB->ObjectInfoTree.TreeLock);
bReleaseVolumeTreeLock = FALSE;
}
//
// The CurrentObject is either destroyed or the reference count has been
// dropped by AFSExamineObjectInfo().