From fcfd1f99d8dd7a83bf09330dfd3b1fc6cc8b11c0 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 26 Nov 2012 01:18:19 -0500 Subject: [PATCH] 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 --- src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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; // -- 2.39.5