From: Jeffrey Altman Date: Mon, 26 Nov 2012 06:18:19 +0000 (-0500) Subject: Windows: AFSLocateNameEntry move InsertNextEntry X-Git-Tag: upstream/1.8.0_pre1^2~1771 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=fcfd1f99d8dd7a83bf09330dfd3b1fc6cc8b11c0;p=packages%2Fo%2Fopenafs.git Windows: AFSLocateNameEntry move InsertNextEntry In AFSLocateNameEntry, move the InsertNextEntry to name array call from before the directory entry DirOpenReferenceCount is incremented to afterwards. This permits InsertNextEntry() to consistently assert based upon the DirOpenReferenceCount value. Change-Id: I3c65f5360650739f6d75b7e657ae5cdea4c14aa4 Reviewed-on: http://gerrit.openafs.org/8517 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp b/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp index ff1096184..c4405a2c5 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp @@ -905,14 +905,6 @@ AFSLocateNameEntry( IN GUID *AuthGroup, ASSERT( pCurrentVolume->VolumeReferenceCount > 1); - // - // The name array stores both the mount point and the target. - // Insert the target. - // - - AFSInsertNextElement( pNameArray, - pCurrentVolume->DirectoryCB); - // // We want to restart processing here on the new parent ... // Deref and ref count the entries @@ -940,6 +932,14 @@ AFSLocateNameEntry( IN GUID *AuthGroup, NULL, lCount); + // + // The name array stores both the mount point and the target. + // Insert the target. + // + + AFSInsertNextElement( pNameArray, + pDirEntry); + pParentDirEntry = NULL; //