Windows: FCB cleanup must be done before ObjectInfo
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 4 May 2012 00:01:22 +0000 (20:01 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 4 May 2012 17:27:53 +0000 (10:27 -0700)
commitf76cf9a3fb30b8c89c91ca10eaff8308cab9630a
tree6fdfd6d7b0d5f01a8ce7ff5d4713eacf211435ae
parente691a757d6f43fa11e3b9a84cf5cbb151a8e9a3b
Windows: FCB cleanup must be done before ObjectInfo

When processing the cleanup and destruction of a File Control Block
the related ObjectInfoCB is required for proper cleanup.  Reorganize
the AFSPrimaryVolumeWorkerThread logic to ensure that this is true.
This involves dropping the VolumeCB->ObjectInfoTree.TreeLock around
the AFSCleanupFcb() call. While the lock is released it is possible
for the ObjectInfoCB->OpenReferenceCount to change.  Therefore, new
checks must be added after the lock is re-acquired to ensure that
an in-use object is not destroyed.

Change-Id: I6b26fb2fe1ef4077c6edd643ec40715c8e2928ac
Reviewed-on: http://gerrit.openafs.org/7327
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp
src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp