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 <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
Jeffrey Altman 2012-11-25 14:30:07 -05:00
parent 5ab61bbc5c
commit 45721d0d56

View File

@ -2788,8 +2788,6 @@ AFSVerifyEntry( IN GUID *AuthGroup,
case AFS_FILE_TYPE_SYMLINK: case AFS_FILE_TYPE_SYMLINK:
{ {
ASSERT( pDirEnumEntry->TargetNameLength > 0);
// //
// Update the metadata for the entry // Update the metadata for the entry
// //
@ -3720,7 +3718,9 @@ AFSUpdateMetaData( IN AFSDirectoryCB *DirEntry,
pObjectInfo->Links = DirEnumEntry->Links; 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); 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, AFSAcquireExcl( &DirEntry->NonPaged->Lock,