[ros-diffs] [jgardou] 54262: [NTOSKRNL] - remove unused variables/arguments - Add small check in MmNotPresentFaultSectionView

jgardou at svn.reactos.org jgardou at svn.reactos.org
Fri Oct 28 16:34:49 UTC 2011


Author: jgardou
Date: Fri Oct 28 16:34:48 2011
New Revision: 54262

URL: http://svn.reactos.org/svn/reactos?rev=54262&view=rev
Log:
[NTOSKRNL]
- remove unused variables/arguments
- Add small check in MmNotPresentFaultSectionView

Modified:
    trunk/reactos/ntoskrnl/include/internal/mm.h
    trunk/reactos/ntoskrnl/mm/anonmem.c
    trunk/reactos/ntoskrnl/mm/mmfault.c
    trunk/reactos/ntoskrnl/mm/section.c

Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/mm.h?rev=54262&r1=54261&r2=54262&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Fri Oct 28 16:34:48 2011
@@ -935,8 +935,7 @@
 MmNotPresentFaultVirtualMemory(
     PMMSUPPORT AddressSpace,
     MEMORY_AREA* MemoryArea,
-    PVOID Address,
-    BOOLEAN Locked
+    PVOID Address
 );
 
 NTSTATUS
@@ -1656,8 +1655,7 @@
 MmNotPresentFaultSectionView(
     PMMSUPPORT AddressSpace,
     MEMORY_AREA* MemoryArea,
-    PVOID Address,
-    BOOLEAN Locked
+    PVOID Address
 );
 
 NTSTATUS
@@ -1678,8 +1676,7 @@
 MmAccessFaultSectionView(
     PMMSUPPORT AddressSpace,
     MEMORY_AREA* MemoryArea,
-    PVOID Address,
-    BOOLEAN Locked
+    PVOID Address
 );
 
 VOID

Modified: trunk/reactos/ntoskrnl/mm/anonmem.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/anonmem.c?rev=54262&r1=54261&r2=54262&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] Fri Oct 28 16:34:48 2011
@@ -161,8 +161,7 @@
 NTAPI
 MmNotPresentFaultVirtualMemory(PMMSUPPORT AddressSpace,
                                MEMORY_AREA* MemoryArea,
-                               PVOID Address,
-                               BOOLEAN Locked)
+                               PVOID Address)
 /*
  * FUNCTION: Move data into memory to satisfy a page not present fault
  * ARGUMENTS:

Modified: trunk/reactos/ntoskrnl/mm/mmfault.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mmfault.c?rev=54262&r1=54261&r2=54262&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] Fri Oct 28 16:34:48 2011
@@ -29,8 +29,7 @@
    PMMSUPPORT AddressSpace;
    MEMORY_AREA* MemoryArea;
    NTSTATUS Status;
-   BOOLEAN Locked = FromMdl;
-
+   
    DPRINT("MmAccessFault(Mode %d, Address %x)\n", Mode, Address);
 
    if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
@@ -80,8 +79,7 @@
          case MEMORY_AREA_SECTION_VIEW:
             Status = MmAccessFaultSectionView(AddressSpace,
                                               MemoryArea,
-                                              (PVOID)Address,
-                                              Locked);
+                                              (PVOID)Address);
             break;
 
          case MEMORY_AREA_VIRTUAL_MEMORY:
@@ -124,7 +122,6 @@
    PMMSUPPORT AddressSpace;
    MEMORY_AREA* MemoryArea;
    NTSTATUS Status;
-   BOOLEAN Locked = FromMdl;
 
    DPRINT("MmNotPresentFault(Mode %d, Address %x)\n", Mode, Address);
 
@@ -179,15 +176,13 @@
          case MEMORY_AREA_SECTION_VIEW:
             Status = MmNotPresentFaultSectionView(AddressSpace,
                                                   MemoryArea,
-                                                  (PVOID)Address,
-                                                  Locked);
+                                                  (PVOID)Address);
             break;
 
          case MEMORY_AREA_VIRTUAL_MEMORY:
             Status = MmNotPresentFaultVirtualMemory(AddressSpace,
                                                     MemoryArea,
-                                                    (PVOID)Address,
-                                                    Locked);
+                                                    (PVOID)Address);
             break;
 
 #ifdef  NEWCC

Modified: trunk/reactos/ntoskrnl/mm/section.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=54262&r1=54261&r2=54262&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Fri Oct 28 16:34:48 2011
@@ -1309,8 +1309,7 @@
 NTAPI
 MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace,
                              MEMORY_AREA* MemoryArea,
-                             PVOID Address,
-                             BOOLEAN Locked)
+                             PVOID Address)
 {
    ULONG Offset;
    PFN_NUMBER Page;
@@ -1334,6 +1333,14 @@
    if (MmIsPagePresent(Process, Address))
    {
       return(STATUS_SUCCESS);
+   }
+   
+   /*
+    * Check for the virtual memory area being deleted.
+    */
+   if (MemoryArea->DeleteInProgress)
+   {
+      return(STATUS_UNSUCCESSFUL);
    }
 
    PAddress = MM_ROUND_DOWN(Address, PAGE_SIZE);
@@ -1805,8 +1812,7 @@
 NTAPI
 MmAccessFaultSectionView(PMMSUPPORT AddressSpace,
                          MEMORY_AREA* MemoryArea,
-                         PVOID Address,
-                         BOOLEAN Locked)
+                         PVOID Address)
 {
    PMM_SECTION_SEGMENT Segment;
    PROS_SECTION_OBJECT Section;
@@ -1820,7 +1826,7 @@
    ULONG Entry;
    PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
 
-   DPRINT("MmAccessFaultSectionView(%x, %x, %x, %x)\n", AddressSpace, MemoryArea, Address, Locked);
+   DPRINT("MmAccessFaultSectionView(%x, %x, %x, %x)\n", AddressSpace, MemoryArea, Address);
 
    /*
     * Check if the page has been paged out or has already been set readwrite




More information about the Ros-diffs mailing list