mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
Windows: avoid deadlock TreeLock vs Fcb Resource
Cannot call AFSPerformObjectInvalidate directly because ObjectInfoCB->Specific.Directory.DirectoryNodeHdr.TreeLock is held during the sequence AFSVerifyEntry->AFSValidateDirectoryCache->AFSVerifyDirectoryContent and AFSPerformObjectInvalidate requires the Fcb->NPFcb->Resource which must be held prior to the TreeLock. Change-Id: I337f52e2927c8e5ae2d218867987625c3240a792 Reviewed-on: http://gerrit.openafs.org/7423 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com> Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
parent
564c9733e5
commit
3a7dbe3315
@ -1070,12 +1070,22 @@ AFSVerifyDirectoryContent( IN AFSObjectInfoCB *ObjectInfoCB,
|
|||||||
|
|
||||||
//
|
//
|
||||||
// The ObjectReferenceCount will be freed by AFSPerformObjectInvalidate
|
// The ObjectReferenceCount will be freed by AFSPerformObjectInvalidate
|
||||||
|
// if successfully queued. Cannot call AFSPerformObjectInvalidate directly
|
||||||
|
// because ObjectInfoCB->Specific.Directory.DirectoryNodeHdr.TreeLock is
|
||||||
|
// held during the sequence AFSVerifyEntry->AFSValidateDirectoryCache->
|
||||||
|
// AFSVerifyDirectoryContent and AFSPerformObjectInvalidate requires the
|
||||||
|
// Fcb->NPFcb->Resource which must be held prior to the TreeLock in the
|
||||||
|
// lock hierarchy.
|
||||||
//
|
//
|
||||||
|
|
||||||
lCount = InterlockedIncrement( &pObjectInfo->ObjectReferenceCount);
|
lCount = InterlockedIncrement( &pObjectInfo->ObjectReferenceCount);
|
||||||
|
|
||||||
AFSPerformObjectInvalidate( pObjectInfo,
|
if ( !NT_SUCCESS( AFSQueueInvalidateObject( pObjectInfo,
|
||||||
AFS_INVALIDATE_DATA_VERSION);
|
AFS_INVALIDATE_DATA_VERSION)))
|
||||||
|
{
|
||||||
|
|
||||||
|
lCount = InterlockedDecrement( &pObjectInfo->ObjectReferenceCount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user