https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0e932c7bef7641314c54b1...
commit 0e932c7bef7641314c54b149a1b3a6a4589c2ef1 Author: Pierre Schweitzer pierre@reactos.org AuthorDate: Wed Feb 7 22:23:25 2018 +0100 Commit: Pierre Schweitzer pierre@reactos.org CommitDate: Wed Feb 7 22:23:49 2018 +0100
[NTOSKRNL] Drop the CcTryToInitializeFileCache() which is actually doing nothing relevant --- ntoskrnl/cc/view.c | 31 ------------------------------- ntoskrnl/include/internal/cc.h | 4 ---- ntoskrnl/mm/section.c | 12 +----------- 3 files changed, 1 insertion(+), 46 deletions(-)
diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c index 2e8fb6c51e..1b4468cd41 100644 --- a/ntoskrnl/cc/view.c +++ b/ntoskrnl/cc/view.c @@ -1197,37 +1197,6 @@ CcRosReleaseFileCache ( return STATUS_SUCCESS; }
-NTSTATUS -NTAPI -CcTryToInitializeFileCache ( - PFILE_OBJECT FileObject) -{ - PROS_SHARED_CACHE_MAP SharedCacheMap; - NTSTATUS Status; - - KeAcquireGuardedMutex(&ViewLock); - - ASSERT(FileObject->SectionObjectPointer); - SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap; - if (SharedCacheMap == NULL) - { - Status = STATUS_UNSUCCESSFUL; - } - else - { - if (FileObject->PrivateCacheMap == NULL) - { - FileObject->PrivateCacheMap = SharedCacheMap; - SharedCacheMap->OpenCount++; - } - Status = STATUS_SUCCESS; - } - KeReleaseGuardedMutex(&ViewLock); - - return Status; -} - - NTSTATUS NTAPI CcRosInitializeFileCache ( diff --git a/ntoskrnl/include/internal/cc.h b/ntoskrnl/include/internal/cc.h index 3a44fda908..f78e9c0491 100644 --- a/ntoskrnl/include/internal/cc.h +++ b/ntoskrnl/include/internal/cc.h @@ -406,10 +406,6 @@ CcRosReleaseFileCache( PFILE_OBJECT FileObject );
-NTSTATUS -NTAPI -CcTryToInitializeFileCache(PFILE_OBJECT FileObject); - VOID NTAPI CcShutdownSystem(VOID); diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c index 5c954395a9..b588f1c617 100644 --- a/ntoskrnl/mm/section.c +++ b/ntoskrnl/mm/section.c @@ -3758,17 +3758,7 @@ MmCreateImageSection(PROS_SECTION_OBJECT *SectionObject, Section->SectionPageProtection = SectionPageProtection; Section->AllocationAttributes = AllocationAttributes;
-#ifndef NEWCC - /* - * Initialized caching for this file object if previously caching - * was initialized for the same on disk file - */ - Status = CcTryToInitializeFileCache(FileObject); -#else - Status = STATUS_SUCCESS; -#endif - - if (!NT_SUCCESS(Status) || FileObject->SectionObjectPointer->ImageSectionObject == NULL) + if (FileObject->SectionObjectPointer->ImageSectionObject == NULL) { NTSTATUS StatusExeFmt;