[NTOSKRNL]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 20 Nov 2016 10:51:26 +0000 (10:51 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 20 Nov 2016 10:51:26 +0000 (10:51 +0000)
Use the appropriated macro to check for pending operations. NFC
ROSTESTS-248

svn path=/trunk/; revision=73323

reactos/ntoskrnl/mm/rmap.c
reactos/ntoskrnl/mm/section.c

index e90a64d..0064ba2 100644 (file)
@@ -146,7 +146,7 @@ MmPageOutPhysicalAddress(PFN_NUMBER Page)
          */
         Entry = MmGetPageEntrySectionSegment(MemoryArea->Data.SectionData.Segment,
                                              (PLARGE_INTEGER)&Offset);
-        if (Entry && IS_SWAP_FROM_SSE(Entry) && SWAPENTRY_FROM_SSE(Entry) == MM_WAIT_ENTRY)
+        if (Entry && MM_IS_WAIT_PTE(Entry))
         {
             MmUnlockSectionSegment(MemoryArea->Data.SectionData.Segment);
             MmUnlockAddressSpace(AddressSpace);
index f4b9986..d50630d 100644 (file)
@@ -1354,7 +1354,7 @@ MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace,
      * Check if someone else is already handling this fault, if so wait
      * for them
      */
-    if (Entry && IS_SWAP_FROM_SSE(Entry) && SWAPENTRY_FROM_SSE(Entry) == MM_WAIT_ENTRY)
+    if (Entry && MM_IS_WAIT_PTE(Entry))
     {
         MmUnlockSectionSegment(Segment);
         MmUnlockAddressSpace(AddressSpace);
@@ -4021,7 +4021,7 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
     Segment = MemoryArea->Data.SectionData.Segment;
 
     Entry = MmGetPageEntrySectionSegment(Segment, &Offset);
-    while (Entry && IS_SWAP_FROM_SSE(Entry) && SWAPENTRY_FROM_SSE(Entry) == MM_WAIT_ENTRY)
+    while (Entry && MM_IS_WAIT_PTE(Entry))
     {
         MmUnlockSectionSegment(Segment);
         MmUnlockAddressSpace(AddressSpace);