Windows: Replace ParentObjectInformation pointer
[openafs.git] / src / WINNT / afsrdr / kernel / lib / AFSBTreeSupport.cpp
index a870045..45afde0 100644 (file)
@@ -45,7 +45,6 @@ AFSLocateCaseSensitiveDirEntry( IN AFSDirectoryCB *RootNode,
 {
 
     NTSTATUS    ntStatus = STATUS_SUCCESS;
-    AFSDirectoryCB   *pEntry = NULL;
     AFSDirectoryCB   *pCurrentEntry = NULL;
 
     pCurrentEntry = RootNode;
@@ -164,7 +163,6 @@ AFSLocateCaseInsensitiveDirEntry( IN AFSDirectoryCB *RootNode,
 {
 
     NTSTATUS    ntStatus = STATUS_SUCCESS;
-    AFSDirectoryCB   *pEntry = NULL;
     AFSDirectoryCB   *pCurrentEntry = NULL;
 
     pCurrentEntry = RootNode;
@@ -368,11 +366,10 @@ AFSInsertCaseSensitiveDirEntry( IN AFSDirectoryCB *RootNode,
             {
 
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
-                              AFS_TRACE_LEVEL_WARNING,
-                              "AFSInsertCaseSensitiveDirEntry Attempt to re-insert a CRC %I64X\n",
-                              DirEntry->CaseSensitiveTreeEntry.HashIndex);
-
-                ASSERT( FALSE);
+                              AFS_TRACE_LEVEL_VERBOSE,
+                              "AFSInsertCaseSensitiveDirEntry Collision with DE %p for %wZ\n",
+                              pCurrentEntry,
+                              &pCurrentEntry->NameInformation.FileName);
 
                 ntStatus = STATUS_UNSUCCESSFUL;
 
@@ -484,7 +481,7 @@ AFSInsertCaseInsensitiveDirEntry( IN AFSDirectoryCB *RootNode,
             {
 
                 //
-                // Inser the the entry at the end of the insensitive list
+                // Insert the the entry at the end of the insensitive list
                 //
 
                 while( pCurrentEntry->CaseInsensitiveList.fLink != NULL)
@@ -881,7 +878,6 @@ AFSLocateShortNameDirEntry( IN AFSDirectoryCB *RootNode,
 {
 
     NTSTATUS    ntStatus = STATUS_SUCCESS;
-    AFSDirectoryCB   *pEntry = NULL;
     AFSDirectoryCB   *pCurrentEntry = NULL;
 
     pCurrentEntry = RootNode;
@@ -1084,6 +1080,15 @@ AFSInsertShortNameDirEntry( IN AFSDirectoryCB *RootNode,
             else
             {
 
+                ntStatus = STATUS_UNSUCCESSFUL;
+
+                AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
+                              AFS_TRACE_LEVEL_VERBOSE,
+                              "AFSInsertShortNameDirEntry Collision with DE %p for shortname %S and %wZ\n",
+                              pCurrentEntry,
+                              pCurrentEntry->NameInformation.ShortName,
+                              &pCurrentEntry->NameInformation.FileName);
+
                 break;
             }
         }
@@ -1247,8 +1252,7 @@ AFSLocateHashEntry( IN AFSBTreeEntry *TopNode,
                     IN OUT AFSBTreeEntry **TreeEntry)
 {
 
-    NTSTATUS         ntStatus = STATUS_SUCCESS;
-    AFSBTreeEntry   *pEntry = NULL;
+    NTSTATUS         ntStatus = STATUS_NOT_FOUND;
     AFSBTreeEntry   *pCurrentEntry = NULL;
 
     pCurrentEntry = TopNode;
@@ -1275,7 +1279,7 @@ AFSLocateHashEntry( IN AFSBTreeEntry *TopNode,
 
             *TreeEntry = TopNode;
 
-            try_return( ntStatus);
+            try_return( ntStatus = STATUS_SUCCESS);
         }
 
         //
@@ -1346,6 +1350,8 @@ AFSLocateHashEntry( IN AFSBTreeEntry *TopNode,
 
                 *TreeEntry = pCurrentEntry;
 
+                ntStatus = STATUS_SUCCESS;
+
                 break;
             }
         }
@@ -1454,8 +1460,6 @@ AFSInsertHashEntry( IN AFSBTreeEntry *TopNode,
                               "AFSInsertHashEntry Attempt to re-insert a CRC %I64X\n",
                               FileIDEntry->HashIndex);
 
-                ASSERT( FALSE);
-
                 ntStatus = STATUS_UNSUCCESSFUL;
 
                 break;