Hopefully fail to break anything in the process of syncing with trunk (r47786)
[reactos.git] / ntoskrnl / mm / mpw.c
index d96b13a..89fba8d 100644 (file)
@@ -23,36 +23,7 @@ BOOLEAN MpwThreadShouldTerminate;
 
 /* FUNCTIONS *****************************************************************/
 
-NTSTATUS STDCALL
-MmWriteDirtyPages(ULONG Target, PULONG Actual)
-{
-   PFN_TYPE Page;
-   PFN_TYPE NextPage;
-   NTSTATUS Status;
-
-   Page = MmGetLRUFirstUserPage();
-   while (Page != 0 && Target > 0)
-   {
-      /*
-       * FIXME: While the current page is write back it is possible
-       *        that the next page is freed and not longer a user page.
-       */
-      NextPage = MmGetLRUNextUserPage(Page);
-      if (MmIsDirtyPageRmap(Page))
-      {
-         Status = MmWritePagePhysicalAddress(Page);
-         if (NT_SUCCESS(Status))
-         {
-            Target--;
-         }
-      }
-      Page = NextPage;
-   }
-   *Actual = Target;
-   return(STATUS_SUCCESS);
-}
-
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 MmMpwThreadMain(PVOID Ignored)
 {
    NTSTATUS Status;
@@ -71,7 +42,7 @@ MmMpwThreadMain(PVOID Ignored)
       if (!NT_SUCCESS(Status))
       {
          DbgPrint("MpwThread: Wait failed\n");
-         ASSERT(FALSE);
+         KeBugCheck(MEMORY_MANAGEMENT);
          return(STATUS_UNSUCCESSFUL);
       }
       if (MpwThreadShouldTerminate)
@@ -81,12 +52,6 @@ MmMpwThreadMain(PVOID Ignored)
       }
 
       PagesWritten = 0;
-#if 0
-      /*
-       *  FIXME: MmWriteDirtyPages doesn't work correctly.
-       */
-      MmWriteDirtyPages(128, &PagesWritten);
-#endif
 
       CcRosFlushDirtyPages(128, &PagesWritten);
    }