[NTOSKRNL] Drop the CcTryToInitializeFileCache() which is actually doing nothing...
authorPierre Schweitzer <pierre@reactos.org>
Wed, 7 Feb 2018 21:23:25 +0000 (22:23 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Wed, 7 Feb 2018 21:23:49 +0000 (22:23 +0100)
ntoskrnl/cc/view.c
ntoskrnl/include/internal/cc.h
ntoskrnl/mm/section.c

index 2e8fb6c..1b4468c 100644 (file)
@@ -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 (
index 3a44fda..f78e9c0 100644 (file)
@@ -406,10 +406,6 @@ CcRosReleaseFileCache(
     PFILE_OBJECT FileObject
 );
 
-NTSTATUS
-NTAPI
-CcTryToInitializeFileCache(PFILE_OBJECT FileObject);
-
 VOID
 NTAPI
 CcShutdownSystem(VOID);
index 5c95439..b588f1c 100644 (file)
@@ -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;