[NTOSKRNL] Drop the CcTryToInitializeFileCache() which is actually doing nothing relevant

This commit is contained in:
Pierre Schweitzer 2018-02-07 22:23:25 +01:00
parent 6ece4e9fc2
commit 0e932c7bef
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
3 changed files with 1 additions and 46 deletions

View 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 (

View file

@ -406,10 +406,6 @@ CcRosReleaseFileCache(
PFILE_OBJECT FileObject
);
NTSTATUS
NTAPI
CcTryToInitializeFileCache(PFILE_OBJECT FileObject);
VOID
NTAPI
CcShutdownSystem(VOID);

View 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;