//
if( BooleanFlagOn( pCurrentDirEntry->Flags, AFS_DIR_ENTRY_DELETED) &&
- pCurrentDirEntry->DirOpenReferenceCount <= 0)
+ pCurrentDirEntry->DirOpenReferenceCount <= 0 &&
+ pCurrentDirEntry->NameArrayReferenceCount <= 0)
{
AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
pCurrentDirEntry,
pCurrentDirEntry->DirOpenReferenceCount);
- if( pCurrentDirEntry->DirOpenReferenceCount <= 0)
+ if( pCurrentDirEntry->DirOpenReferenceCount <= 0 &&
+ pCurrentDirEntry->NameArrayReferenceCount <= 0)
{
AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
pNextDirEntry = (AFSDirectoryCB *)pCurrentDirEntry->ListEntry.fLink;
- if( pCurrentDirEntry->DirOpenReferenceCount <= 0)
+ if( pCurrentDirEntry->DirOpenReferenceCount <= 0 &&
+ pCurrentDirEntry->NameArrayReferenceCount <= 0)
{
AFSDbgLogMsg( AFS_SUBSYSTEM_CLEANUP_PROCESSING,
pDirGlobalDirNode = AFSGlobalRoot->ObjectInformation.Specific.Directory.DirectoryNodeListHead;
- //
- // Indicate the node is initialized
- //
-
- SetFlag( AFSGlobalRoot->ObjectInformation.Flags, AFS_OBJECT_FLAGS_DIRECTORY_ENUMERATED);
-
uniFullName.MaximumLength = PAGE_SIZE;
uniFullName.Length = 0;
__Enter
{
- AFSDbgLogMsg( AFS_SUBSYSTEM_NAME_ARRAY_PROCESSING,
- AFS_TRACE_LEVEL_VERBOSE,
- "AFSPopulateNameArray [NA:%p] passed RelatedNameArray %p DE %p FID %08lX-%08lX-%08lX-%08lX %wZ Type %d\n",
- NameArray,
- RelatedNameArray,
- DirectoryCB,
- DirectoryCB->ObjectInformation->FileId.Cell,
- DirectoryCB->ObjectInformation->FileId.Volume,
- DirectoryCB->ObjectInformation->FileId.Vnode,
- DirectoryCB->ObjectInformation->FileId.Unique,
- &DirectoryCB->NameInformation.FileName,
- DirectoryCB->ObjectInformation->FileType);
+ if ( DirectoryCB)
+ {
+
+ AFSDbgLogMsg( AFS_SUBSYSTEM_NAME_ARRAY_PROCESSING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSPopulateNameArray [NA:%p] passed RelatedNameArray %p DE %p FID %08lX-%08lX-%08lX-%08lX %wZ Type %d\n",
+ NameArray,
+ RelatedNameArray,
+ DirectoryCB,
+ DirectoryCB->ObjectInformation->FileId.Cell,
+ DirectoryCB->ObjectInformation->FileId.Volume,
+ DirectoryCB->ObjectInformation->FileId.Vnode,
+ DirectoryCB->ObjectInformation->FileId.Unique,
+ &DirectoryCB->NameInformation.FileName,
+ DirectoryCB->ObjectInformation->FileType);
+ }
+ else
+ {
+
+ AFSDbgLogMsg( AFS_SUBSYSTEM_NAME_ARRAY_PROCESSING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSPopulateNameArray [NA:%p] passed RelatedNameArray %p DE NULL\n",
+ NameArray,
+ RelatedNameArray);
+ }
//
// Init some info in the header
&pDirectoryEntry,
NULL);
- //
- // AFSLocateNameEntry returns pNewVolumeCB with a reference held
- // even if pVolumeCB == pNewVolumeCB. It is always safe to release
- // the reference on pVolumeCB that was held prior to the call.
- // If pVolumeCB == pNewVolumeCB, the reference from AFSLocateNameEntry
- // will be released second.
- //
+ if ( pNewVolumeCB != NULL)
+ {
+ //
+ // AFSLocateNameEntry returns pNewVolumeCB with a reference held
+ // even if pVolumeCB == pNewVolumeCB. It is always safe to release
+ // the reference on pVolumeCB that was held prior to the call.
+ // If pVolumeCB == pNewVolumeCB, the reference from AFSLocateNameEntry
+ // will be released second.
+ //
- lCount = AFSVolumeDecrement( pVolumeCB,
- VolumeReferenceReason);
+ lCount = AFSVolumeDecrement( pVolumeCB,
+ VolumeReferenceReason);
- AFSDbgLogMsg( AFS_SUBSYSTEM_VOLUME_REF_COUNTING,
- AFS_TRACE_LEVEL_VERBOSE,
- "AFSRetrieveFileAttributes Decrement count on volume %p Reason %u Cnt %d\n",
- pVolumeCB,
- VolumeReferenceReason,
- lCount);
+ AFSDbgLogMsg( AFS_SUBSYSTEM_VOLUME_REF_COUNTING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSRetrieveFileAttributes Decrement count on volume %p Reason %u Cnt %d\n",
+ pVolumeCB,
+ VolumeReferenceReason,
+ lCount);
- pVolumeCB = pNewVolumeCB;
+ pVolumeCB = pNewVolumeCB;
- pNewVolumeCB = NULL;
+ pNewVolumeCB = NULL;
- VolumeReferenceReason = NewVolumeReferenceReason;
+ VolumeReferenceReason = NewVolumeReferenceReason;
- NewVolumeReferenceReason = AFS_VOLUME_REFERENCE_INVALID;
+ NewVolumeReferenceReason = AFS_VOLUME_REFERENCE_INVALID;
+ }
//
// AFSLocateNameEntry does not alter the reference count of
&pDirectoryEntry,
NULL);
- //
- // AFSLocateNameEntry returns pNewVolumeCB with a reference held
- // even if pVolumeCB == pNewVolumeCB. It is always safe to release
- // the reference on pVolumeCB that was held prior to the call.
- // If pVolumeCB == pNewVolumeCB, the reference from AFSLocateNameEntry
- // will be released second.
- //
+ if ( pNewVolumeCB != NULL)
+ {
+ //
+ // AFSLocateNameEntry returns pNewVolumeCB with a reference held
+ // even if pVolumeCB == pNewVolumeCB. It is always safe to release
+ // the reference on pVolumeCB that was held prior to the call.
+ // If pVolumeCB == pNewVolumeCB, the reference from AFSLocateNameEntry
+ // will be released second.
+ //
- lCount = AFSVolumeDecrement( pVolumeCB,
- VolumeReferenceReason);
+ lCount = AFSVolumeDecrement( pVolumeCB,
+ VolumeReferenceReason);
- AFSDbgLogMsg( AFS_SUBSYSTEM_VOLUME_REF_COUNTING,
- AFS_TRACE_LEVEL_VERBOSE,
- "AFSEvaluateRootEntry Decrement count on volume %p Reason %u Cnt %d\n",
- pVolumeCB,
- VolumeReferenceReason,
- lCount);
+ AFSDbgLogMsg( AFS_SUBSYSTEM_VOLUME_REF_COUNTING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSEvaluateRootEntry Decrement count on volume %p Reason %u Cnt %d\n",
+ pVolumeCB,
+ VolumeReferenceReason,
+ lCount);
- pVolumeCB = pNewVolumeCB;
+ pVolumeCB = pNewVolumeCB;
- pNewVolumeCB = NULL;
+ pNewVolumeCB = NULL;
- VolumeReferenceReason = NewVolumeReferenceReason;
+ VolumeReferenceReason = NewVolumeReferenceReason;
- NewVolumeReferenceReason = AFS_VOLUME_REFERENCE_INVALID;
+ NewVolumeReferenceReason = AFS_VOLUME_REFERENCE_INVALID;
+ }
//
// AFSLocateNameEntry does not alter the reference count of
if( BooleanFlagOn( DirEntry->Flags, AFS_DIR_ENTRY_NOT_IN_PARENT_TREE))
{
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+ AFSDbgLogMsg( AFS_SUBSYSTEM_CLEANUP_PROCESSING,
AFS_TRACE_LEVEL_VERBOSE,
"AFSRemoveNameEntry DE %p for %wZ has NOT_IN flag set\n",
DirEntry,
// Remove the entry from the parent tree
//
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+ AFSDbgLogMsg( AFS_SUBSYSTEM_CLEANUP_PROCESSING,
AFS_TRACE_LEVEL_VERBOSE,
"AFSRemoveNameEntry DE %p for %wZ removing from case sensitive tree\n",
DirEntry,
AFSRemoveCaseSensitiveDirEntry( &ParentObjectInfo->Specific.Directory.DirectoryNodeHdr.CaseSensitiveTreeHead,
DirEntry);
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+ AFSDbgLogMsg( AFS_SUBSYSTEM_CLEANUP_PROCESSING,
AFS_TRACE_LEVEL_VERBOSE,
"AFSRemoveNameEntry DE %p for %wZ removing from case insensitive tree\n",
DirEntry,
// From the short name tree
//
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+ AFSDbgLogMsg( AFS_SUBSYSTEM_CLEANUP_PROCESSING,
AFS_TRACE_LEVEL_VERBOSE,
"AFSRemoveNameEntry DE %p for %wZ removing from shortname tree\n",
DirEntry,
ClearFlag( DirEntry->Flags, AFS_DIR_ENTRY_INSERTED_SHORT_NAME);
}
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+ AFSDbgLogMsg( AFS_SUBSYSTEM_CLEANUP_PROCESSING,
AFS_TRACE_LEVEL_VERBOSE,
"AFSRemoveNameEntry DE %p for %wZ setting NOT_IN flag\n",
DirEntry,
&pDirectoryEntry,
NULL);
- //
- // AFSLocateNameEntry returns pNewVolumeCB with a reference held
- // even if pVolumeCB == pNewVolumeCB. It is always safe to release
- // the reference on pVolumeCB that was held prior to the call.
- // If pVolumeCB == pNewVolumeCB, the reference from AFSLocateNameEntry
- // will be released second.
- //
+ if ( pNewVolumeCB != NULL)
+ {
- lCount = AFSVolumeDecrement( pVolumeCB,
- VolumeReferenceReason);
+ //
+ // AFSLocateNameEntry returns pNewVolumeCB with a reference held
+ // even if pVolumeCB == pNewVolumeCB. It is always safe to release
+ // the reference on pVolumeCB that was held prior to the call.
+ // If pVolumeCB == pNewVolumeCB, the reference from AFSLocateNameEntry
+ // will be released second.
+ //
- AFSDbgLogMsg( AFS_SUBSYSTEM_VOLUME_REF_COUNTING,
- AFS_TRACE_LEVEL_VERBOSE,
- "AFSGetObjectStatus Decrement count on volume %p Reason %u Cnt %d\n",
- pVolumeCB,
- VolumeReferenceReason,
- lCount);
+ lCount = AFSVolumeDecrement( pVolumeCB,
+ VolumeReferenceReason);
- pVolumeCB = pNewVolumeCB;
+ AFSDbgLogMsg( AFS_SUBSYSTEM_VOLUME_REF_COUNTING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSGetObjectStatus Decrement count on volume %p Reason %u Cnt %d\n",
+ pVolumeCB,
+ VolumeReferenceReason,
+ lCount);
- pNewVolumeCB = NULL;
+ pVolumeCB = pNewVolumeCB;
- VolumeReferenceReason = NewVolumeReferenceReason;
+ pNewVolumeCB = NULL;
- NewVolumeReferenceReason = AFS_VOLUME_REFERENCE_INVALID;
+ VolumeReferenceReason = NewVolumeReferenceReason;
+
+ NewVolumeReferenceReason = AFS_VOLUME_REFERENCE_INVALID;
+ }
//
// AFSLocateNameEntry does not alter the reference count of