[NTOSKRNL]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 5 Oct 2014 07:16:01 +0000 (07:16 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 5 Oct 2014 07:16:01 +0000 (07:16 +0000)
Remove obsolete FreePage parameter from MmDeleteVirtualMapping

svn path=/trunk/; revision=64532

reactos/ntoskrnl/cache/section/data.c
reactos/ntoskrnl/cache/section/swapout.c
reactos/ntoskrnl/include/internal/mm.h
reactos/ntoskrnl/mm/amd64/page.c
reactos/ntoskrnl/mm/arm/page.c
reactos/ntoskrnl/mm/arm/stubs.c
reactos/ntoskrnl/mm/i386/page.c
reactos/ntoskrnl/mm/i386/pagepae.c
reactos/ntoskrnl/mm/marea.c
reactos/ntoskrnl/mm/powerpc/page.c
reactos/ntoskrnl/mm/section.c

index 5ce903d..09ab943 100644 (file)
@@ -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)
index f59c5bf..fe642ae 100644 (file)
@@ -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. */
index bbf148d..af198fa 100644 (file)
@@ -1158,7 +1158,6 @@ NTAPI
 MmDeleteVirtualMapping(
     struct _EPROCESS *Process,
     PVOID Address,
-    BOOLEAN FreePage,
     BOOLEAN* WasDirty,
     PPFN_NUMBER Page
 );
index 315feb0..198173f 100644 (file)
@@ -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;
index de76e66..1bb39ff 100644 (file)
@@ -180,7 +180,6 @@ VOID
 NTAPI
 MmDeleteVirtualMapping(IN PEPROCESS Process,
                        IN PVOID Address,
-                       IN BOOLEAN FreePage,
                        OUT PBOOLEAN WasDirty,
                        OUT PPFN_NUMBER Page)
 {
index bed724d..cbcd5f9 100644 (file)
@@ -474,7 +474,6 @@ VOID
 NTAPI
 MmDeleteVirtualMapping(IN PEPROCESS Process,
                        IN PVOID Address,
-                       IN BOOLEAN FreePage,
                        OUT PBOOLEAN WasDirty,
                        OUT PPFN_NUMBER Page)
 {
index 3ccebac..ded3ad4 100644 (file)
@@ -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
     {
index f217e97..60457cc 100644 (file)
@@ -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
        */
index 39fc28e..f8fa724 100644 (file)
@@ -837,7 +837,7 @@ MmFreeMemoryArea(
             }
             else
             {
-                MmDeleteVirtualMapping(Process, (PVOID)Address, FALSE, &Dirty, &Page);
+                MmDeleteVirtualMapping(Process, (PVOID)Address, &Dirty, &Page);
             }
             if (FreePage != NULL)
             {
index c0acc48..2a7ce4a 100644 (file)
@@ -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
      */
index 587b35e..aa4a602 100644 (file)
@@ -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)