diff --git a/src/WINNT/afsrdr/kernel/lib/AFSCommSupport.cpp b/src/WINNT/afsrdr/kernel/lib/AFSCommSupport.cpp index 5b60847121..47d160f6d2 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSCommSupport.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSCommSupport.cpp @@ -2168,6 +2168,9 @@ AFSNotifyRename( IN AFSObjectInfoCB *ObjectInfo, if ( ParentObjectInfo != TargetParentObjectInfo) { + AFSAcquireExcl( TargetParentObjectInfo->Specific.Directory.DirectoryNodeHdr.TreeLock, + TRUE); + if ( TargetParentObjectInfo->DataVersion.QuadPart == pRenameResultCB->TargetParentDataVersion.QuadPart - 1) { @@ -2243,6 +2246,12 @@ AFSNotifyRename( IN AFSObjectInfoCB *ObjectInfo, DirectoryCB->Type.Data.ShortNameTreeEntry.HashIndex = 0; } + if ( ParentObjectInfo != TargetParentObjectInfo) + { + + AFSReleaseResource( TargetParentObjectInfo->Specific.Directory.DirectoryNodeHdr.TreeLock); + } + AFSReleaseResource( ParentObjectInfo->Specific.Directory.DirectoryNodeHdr.TreeLock); if( UpdatedFID != NULL)