mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[NTOSKRNL]
- Only unmap pages if they were mapped - Make sure the page reference counts are sane when freeing the cache memory area svn path=/trunk/; revision=54690
This commit is contained in:
@@ -645,7 +645,10 @@ CcZeroData (IN PFILE_OBJECT FileObject,
|
||||
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
|
||||
Status = Iosb.Status;
|
||||
}
|
||||
if (Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA)
|
||||
{
|
||||
MmUnmapLockedPages(Mdl->MappedSystemVa, Mdl);
|
||||
}
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return(FALSE);
|
||||
|
||||
@@ -899,6 +899,7 @@ CcFreeCachePage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
|
||||
ASSERT(SwapEntry == 0);
|
||||
if (Page != 0)
|
||||
{
|
||||
ASSERT(MmGetReferenceCountPage(Page) == 1);
|
||||
MmReleasePageMemoryConsumer(MC_CACHE, Page);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user