mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +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:
parent
35c9fc7ae8
commit
4be8d4740d
2 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue