Windows: AFSPrimaryVolumeWorkerThread AFSRemoveFcb
[openafs.git] / src / WINNT / afsrdr / kernel / lib / AFSWorker.cpp
index bb075ac..869e145 100644 (file)
@@ -1171,7 +1171,10 @@ AFSPrimaryVolumeWorkerThread( IN PVOID Context)
                                                 FALSE))
                             {
 
-                                if ( pCurrentObject->ObjectReferenceCount <= 0)
+                                if ( pCurrentObject->ObjectReferenceCount <= 0 &&
+                                     ( pCurrentObject->Fcb == NULL ||
+                                       pCurrentObject->Fcb->OpenReferenceCount == 0 &&
+                                       pCurrentObject->Fcb->Specific.File.ExtentCount == 0))
                                 {
 
                                     AFSRemoveFcb( &pCurrentObject->Fcb);