From 0a3873c1c2b33f993e49952464008476f6b40cde Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 5 Oct 2014 07:16:01 +0000 Subject: [PATCH] [NTOSKRNL] Remove obsolete FreePage parameter from MmDeleteVirtualMapping svn path=/trunk/; revision=64532 --- reactos/ntoskrnl/cache/section/data.c | 2 +- reactos/ntoskrnl/cache/section/swapout.c | 2 +- reactos/ntoskrnl/include/internal/mm.h | 1 - reactos/ntoskrnl/mm/amd64/page.c | 4 ---- reactos/ntoskrnl/mm/arm/page.c | 1 - reactos/ntoskrnl/mm/arm/stubs.c | 1 - reactos/ntoskrnl/mm/i386/page.c | 12 +++--------- reactos/ntoskrnl/mm/i386/pagepae.c | 14 ++------------ reactos/ntoskrnl/mm/marea.c | 2 +- reactos/ntoskrnl/mm/powerpc/page.c | 9 ++------- reactos/ntoskrnl/mm/section.c | 3 +-- 11 files changed, 11 insertions(+), 40 deletions(-) diff --git a/reactos/ntoskrnl/cache/section/data.c b/reactos/ntoskrnl/cache/section/data.c index 5ce903dfcb1..09ab9432019 100644 --- a/reactos/ntoskrnl/cache/section/data.c +++ b/reactos/ntoskrnl/cache/section/data.c @@ -771,7 +771,7 @@ MmFreeCacheSectionPage(PVOID Context, DPRINT("Removing page %p:%I64x -> %x\n", Segment, Offset.QuadPart, Entry); MmSetSavedSwapEntryPage(Page, 0); MmDeleteRmap(Page, Process, Address); - MmDeleteVirtualMapping(Process, Address, FALSE, NULL, NULL); + MmDeleteVirtualMapping(Process, Address, NULL, NULL); MmReleasePageMemoryConsumer(MC_CACHE, Page); } if (SwapEntry != 0) diff --git a/reactos/ntoskrnl/cache/section/swapout.c b/reactos/ntoskrnl/cache/section/swapout.c index f59c5bf7b0c..fe642ae4649 100644 --- a/reactos/ntoskrnl/cache/section/swapout.c +++ b/reactos/ntoskrnl/cache/section/swapout.c @@ -309,7 +309,7 @@ MmPageOutCacheSection(PMMSUPPORT AddressSpace, } MmDeleteRmap(Required->Page[0], Process, Address); - MmDeleteVirtualMapping(Process, Address, FALSE, Dirty, &OurPage); + MmDeleteVirtualMapping(Process, Address, Dirty, &OurPage); ASSERT(OurPage == Required->Page[0]); /* Note: this releases the reference held by this address space only. */ diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index bbf148ddc7a..af198fa9525 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -1158,7 +1158,6 @@ NTAPI MmDeleteVirtualMapping( struct _EPROCESS *Process, PVOID Address, - BOOLEAN FreePage, BOOLEAN* WasDirty, PPFN_NUMBER Page ); diff --git a/reactos/ntoskrnl/mm/amd64/page.c b/reactos/ntoskrnl/mm/amd64/page.c index 315feb01e04..198173f6a28 100644 --- a/reactos/ntoskrnl/mm/amd64/page.c +++ b/reactos/ntoskrnl/mm/amd64/page.c @@ -451,7 +451,6 @@ NTAPI MmDeleteVirtualMapping( PEPROCESS Process, PVOID Address, - BOOLEAN FreePage, BOOLEAN* WasDirty, PPFN_NUMBER Page) { @@ -469,9 +468,6 @@ MmDeleteVirtualMapping( if (OldPte.u.Hard.Valid) { Pfn = OldPte.u.Hard.PageFrameNumber; - - //if (FreePage) - //MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn); } else Pfn = 0; diff --git a/reactos/ntoskrnl/mm/arm/page.c b/reactos/ntoskrnl/mm/arm/page.c index de76e662340..1bb39ff336e 100644 --- a/reactos/ntoskrnl/mm/arm/page.c +++ b/reactos/ntoskrnl/mm/arm/page.c @@ -180,7 +180,6 @@ VOID NTAPI MmDeleteVirtualMapping(IN PEPROCESS Process, IN PVOID Address, - IN BOOLEAN FreePage, OUT PBOOLEAN WasDirty, OUT PPFN_NUMBER Page) { diff --git a/reactos/ntoskrnl/mm/arm/stubs.c b/reactos/ntoskrnl/mm/arm/stubs.c index bed724de73e..cbcd5f95027 100644 --- a/reactos/ntoskrnl/mm/arm/stubs.c +++ b/reactos/ntoskrnl/mm/arm/stubs.c @@ -474,7 +474,6 @@ VOID NTAPI MmDeleteVirtualMapping(IN PEPROCESS Process, IN PVOID Address, - IN BOOLEAN FreePage, OUT PBOOLEAN WasDirty, OUT PPFN_NUMBER Page) { diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index 3ccebac2c38..ded3ad48616 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -358,7 +358,7 @@ MmGetPfnForProcess(PEPROCESS Process, VOID NTAPI -MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, +MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page) /* * FUNCTION: Delete a virtual mapping @@ -369,8 +369,8 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, ULONG Pte; PULONG Pt; - DPRINT("MmDeleteVirtualMapping(%p, %p, %u, %p, %p)\n", - Process, Address, FreePage, WasDirty, Page); + DPRINT("MmDeleteVirtualMapping(%p, %p, %p, %p)\n", + Process, Address, WasDirty, Page); Pt = MmGetPageTableForProcess(Process, Address, FALSE); @@ -410,12 +410,6 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, } Pfn = PTE_TO_PFN(Pte); - - if (FreePage) - { - MmReleasePageMemoryConsumer(MC_SYSTEM, Pfn); - Pfn = 0; - } } else { diff --git a/reactos/ntoskrnl/mm/i386/pagepae.c b/reactos/ntoskrnl/mm/i386/pagepae.c index f217e972884..60457cc28fe 100644 --- a/reactos/ntoskrnl/mm/i386/pagepae.c +++ b/reactos/ntoskrnl/mm/i386/pagepae.c @@ -622,7 +622,7 @@ MmGetPfnForProcess(PEPROCESS Process, VOID NTAPI -MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, +MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page) /* * FUNCTION: Delete a virtual mapping @@ -632,7 +632,7 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, PFN_NUMBER Pfn; DPRINT("MmDeleteVirtualMapping(%x, %x, %d, %x, %x)\n", - Process, Address, FreePage, WasDirty, Page); + Process, Address, WasDirty, Page); if (Ke386Pae) { ULONGLONG Pte; @@ -671,11 +671,6 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, Pfn = 0; } - if (FreePage && WasValid) - { - MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn); - } - /* * Return some information to the caller */ @@ -726,11 +721,6 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, Pfn = 0; } - if (FreePage && WasValid) - { - MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn); - } - /* * Return some information to the caller */ diff --git a/reactos/ntoskrnl/mm/marea.c b/reactos/ntoskrnl/mm/marea.c index 39fc28ef3c8..f8fa724dba8 100644 --- a/reactos/ntoskrnl/mm/marea.c +++ b/reactos/ntoskrnl/mm/marea.c @@ -837,7 +837,7 @@ MmFreeMemoryArea( } else { - MmDeleteVirtualMapping(Process, (PVOID)Address, FALSE, &Dirty, &Page); + MmDeleteVirtualMapping(Process, (PVOID)Address, &Dirty, &Page); } if (FreePage != NULL) { diff --git a/reactos/ntoskrnl/mm/powerpc/page.c b/reactos/ntoskrnl/mm/powerpc/page.c index c0acc4825b2..2a7ce4ad208 100644 --- a/reactos/ntoskrnl/mm/powerpc/page.c +++ b/reactos/ntoskrnl/mm/powerpc/page.c @@ -170,7 +170,7 @@ MmGetPfnForProcess(PEPROCESS Process, VOID NTAPI -MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, +MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page) /* * FUNCTION: Delete a virtual mapping @@ -179,17 +179,12 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage, ppc_map_info_t info = { 0 }; DPRINT("MmDeleteVirtualMapping(%x, %x, %d, %x, %x)\n", - Process, Address, FreePage, WasDirty, Page); + Process, Address, WasDirty, Page); info.proc = Process ? (int)Process->UniqueProcessId : 0; info.addr = (vaddr_t)Address; MmuInqPage(&info, 1); - if (FreePage && info.phys) - { - MmReleasePageMemoryConsumer(MC_NPPOOL, info.phys >> PAGE_SHIFT); - } - /* * Return some information to the caller */ diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 587b35e4fa3..aa4a602d64d 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -1763,7 +1763,7 @@ MmAccessFaultSectionView(PMMSUPPORT AddressSpace, } MmDeleteRmap(OldPage, Process, PAddress); - MmDeleteVirtualMapping(Process, PAddress, FALSE, NULL, NULL); + MmDeleteVirtualMapping(Process, PAddress, NULL, NULL); MmCreatePageFileMapping(Process, PAddress, MM_WAIT_ENTRY); /* @@ -1836,7 +1836,6 @@ MmPageOutDeleteMapping(PVOID Context, PEPROCESS Process, PVOID Address) MmDeleteVirtualMapping(Process, Address, - FALSE, &WasDirty, &Page); if (WasDirty)