From f73685c233974403fe63795303cd1659c5bcb2af Mon Sep 17 00:00:00 2001 From: Peter Scott Date: Thu, 15 Dec 2011 17:52:54 -0700 Subject: [PATCH] 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 --- src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp b/src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp index fc09be20a..2b4e2cc8d 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); -- 2.39.5