From: Peter Scott Date: Fri, 16 Dec 2011 00:52:54 +0000 (-0700) Subject: Windows Problem with cross-directory rename X-Git-Tag: openafs-stable-1_8_0pre1~2935 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=f73685c233974403fe63795303cd1659c5bcb2af;hp=2d472f94ab1017724e56bcdd29b9ef451a13f182 Windows Problem with cross-directory rename Not correctly handling cross-directory rename processing Change-Id: I36e30a68d7755241c727868074e344beb9580c2d Reviewed-on: http://gerrit.openafs.org/6343 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp b/src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp index fc09be2..2b4e2cc 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp @@ -2056,7 +2056,6 @@ AFSSetRenameInfo( IN PIRP Irp) ULONG ulNotificationAction = 0, ulNotifyFilter = 0; UNICODE_STRING uniFullTargetPath; BOOLEAN bCommonParent = FALSE; - ULONG oldFileIndex; BOOLEAN bReleaseVolumeLock = FALSE; BOOLEAN bReleaseTargetDirLock = FALSE; BOOLEAN bReleaseSourceDirLock = FALSE; @@ -2325,21 +2324,6 @@ AFSSetRenameInfo( IN PIRP Irp) pSrcCcb->DirectoryCB, !bCommonParent); - oldFileIndex = pSrcCcb->DirectoryCB->FileIndex; - - if( !bCommonParent) - { - - // - // We always need to update the FileIndex since this entry will be put at the 'end' - // of the enumeraiton list. If we don't it will cause recursion ... We do this - // here to cover any failures which might occur below - // - - pSrcCcb->DirectoryCB->FileIndex = - (ULONG)InterlockedIncrement( &pTargetDcb->ObjectInformation->ParentObjectInformation->Specific.Directory.DirectoryNodeHdr.ContentIndex); - } - // // OK, this is a simple rename. Issue the rename // request to the service. @@ -2359,7 +2343,6 @@ AFSSetRenameInfo( IN PIRP Irp) // Attempt to re-insert the directory entry // - pSrcCcb->DirectoryCB->FileIndex = oldFileIndex; AFSInsertDirectoryNode( pSrcFcb->ObjectInformation->ParentObjectInformation, pSrcCcb->DirectoryCB, !bCommonParent); @@ -2420,7 +2403,6 @@ AFSSetRenameInfo( IN PIRP Irp) // Attempt to re-insert the directory entry // - pSrcCcb->DirectoryCB->FileIndex = oldFileIndex; AFSInsertDirectoryNode( pSrcFcb->ObjectInformation->ParentObjectInformation, pSrcCcb->DirectoryCB, !bCommonParent);