Windows: AFSDeleteObjectInfo AFS_OBJECT_HELD_IN_SERVICE
[openafs.git] / src / WINNT / afsrdr / kernel / lib / AFSGeneric.cpp
index 7d3e102..3e85ec2 100644 (file)
@@ -6267,10 +6267,6 @@ AFSDeleteObjectInfo( IN AFSObjectInfoCB **ppObjectInfo)
 
     ASSERT( *ppObjectInfo == NULL);
 
-    ASSERT( pObjectInfo->ObjectReferenceCount == 0);
-
-    bHeldInService = BooleanFlagOn( pObjectInfo->Flags, AFS_OBJECT_HELD_IN_SERVICE);
-
     if( !ExIsResourceAcquiredExclusiveLite( pObjectInfo->VolumeCB->ObjectInfoTree.TreeLock))
     {
 
@@ -6282,6 +6278,10 @@ AFSDeleteObjectInfo( IN AFSObjectInfoCB **ppObjectInfo)
         bAcquiredTreeLock = TRUE;
     }
 
+    ASSERT( pObjectInfo->ObjectReferenceCount == 0);
+
+    bHeldInService = BooleanFlagOn( pObjectInfo->Flags, AFS_OBJECT_HELD_IN_SERVICE);
+
     if ( BooleanFlagOn( pObjectInfo->Flags, AFS_OBJECT_FLAGS_PARENT_FID))
     {
 
@@ -6367,6 +6367,8 @@ AFSDeleteObjectInfo( IN AFSObjectInfoCB **ppObjectInfo)
         FileId = pObjectInfo->FileId;
     }
 
+    ASSERT( pObjectInfo->ObjectReferenceCount == 0);
+
     ExDeleteResourceLite( &pObjectInfo->NonPagedInfo->ObjectInfoLock);
 
     ExDeleteResourceLite( &pObjectInfo->NonPagedInfo->DirectoryNodeHdrLock);