From 317b227a20a99960b313d06a3441822472d638c8 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 12 Mar 2012 15:53:47 -0400 Subject: [PATCH] Windows: Drop resource across AFSCleanupFcb Avoid additional deadlocks involving VolumeCB->ObjectInfoTree.TreeLock. Change-Id: Ibfeb8f230c54e95d3a0b7b9d84c63cb7f4b9ce2d Reviewed-on: http://gerrit.openafs.org/6893 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp b/src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp index b4adbeca46..6ad10312dd 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp @@ -1534,9 +1534,14 @@ AFSPrimaryVolumeWorkerThread( IN PVOID Context) if( pFcb != NULL) { + AFSReleaseResource( pVolumeCB->ObjectInfoTree.TreeLock); + AFSCleanupFcb( pFcb, TRUE); + AFSAcquireExcl( pVolumeCB->ObjectInfoTree.TreeLock, + TRUE); + AFSRemoveFcb( &pFcb); } @@ -1565,8 +1570,13 @@ AFSPrimaryVolumeWorkerThread( IN PVOID Context) else if( pCurrentObject->Fcb != NULL) { + AFSReleaseResource( pVolumeCB->ObjectInfoTree.TreeLock); + AFSCleanupFcb( pCurrentObject->Fcb, FALSE); + + AFSAcquireShared( pVolumeCB->ObjectInfoTree.TreeLock, + TRUE); } }