From 45721d0d5603ac0d7dae477bf0ed33c54bba6dbc Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 25 Nov 2012 14:30:07 -0500 Subject: [PATCH] Windows: AFSValidateEntry Symlink TargetName During an AFSValidateEntry if the data version of the symlink object has not changed, do not discard or rebuild the target name if already assisgned. Change-Id: If37af308ee48ec761283ff6e831ffa5e06dacf58 Reviewed-on: http://gerrit.openafs.org/8515 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman --- src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp b/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp index 8eb6604a0c..3a0fde8897 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp @@ -2788,8 +2788,6 @@ AFSVerifyEntry( IN GUID *AuthGroup, case AFS_FILE_TYPE_SYMLINK: { - ASSERT( pDirEnumEntry->TargetNameLength > 0); - // // Update the metadata for the entry // @@ -3720,7 +3718,9 @@ AFSUpdateMetaData( IN AFSDirectoryCB *DirEntry, pObjectInfo->Links = DirEnumEntry->Links; - if( DirEnumEntry->TargetNameLength > 0) + if( DirEnumEntry->TargetNameLength > 0 && + ( DirEntry->NameInformation.TargetName.Length != DirEnumEntry->TargetNameLength || + DirEntry->ObjectInformation->DataVersion.QuadPart != DirEnumEntry->DataVersion.QuadPart)) { // @@ -3762,7 +3762,8 @@ AFSUpdateMetaData( IN AFSDirectoryCB *DirEntry, AFSReleaseResource( &DirEntry->NonPaged->Lock); } - else if( DirEntry->NameInformation.TargetName.Length > 0) + else if( DirEntry->NameInformation.TargetName.Length > 0 && + DirEntry->ObjectInformation->DataVersion.QuadPart != DirEnumEntry->DataVersion.QuadPart) { AFSAcquireExcl( &DirEntry->NonPaged->Lock,