[NTOS]: Fix a logic error which could cause pages on the free list which failed to...
authorSir Richard <sir_richard@svn.reactos.org>
Fri, 19 Feb 2010 18:25:29 +0000 (18:25 +0000)
committerSir Richard <sir_richard@svn.reactos.org>
Fri, 19 Feb 2010 18:25:29 +0000 (18:25 +0000)
svn path=/trunk/; revision=45624

reactos/ntoskrnl/mm/freelist.c

index 4eec29d..7098cef 100644 (file)
@@ -1000,15 +1000,16 @@ MmZeroPageThreadMain(PVOID Ignored)
          Status = MiZeroPage(Pfn);
 
          oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
          Status = MiZeroPage(Pfn);
 
          oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
-         PageDescriptor->u3.e1.PageLocation = ZeroedPageList;
          if (NT_SUCCESS(Status))
          {
             InsertHeadList(&FreeZeroedPageListHead, ListEntry);
          if (NT_SUCCESS(Status))
          {
             InsertHeadList(&FreeZeroedPageListHead, ListEntry);
+            PageDescriptor->u3.e1.PageLocation = ZeroedPageList;
             Count++;
          }
          else
          {
             InsertHeadList(&FreeUnzeroedPageListHead, ListEntry);
             Count++;
          }
          else
          {
             InsertHeadList(&FreeUnzeroedPageListHead, ListEntry);
+            PageDescriptor->u3.e1.PageLocation = FreePageList;
             UnzeroedPageCount++;
          }
 
             UnzeroedPageCount++;
          }