[NTOSKRNL]
authorCameron Gutman <aicommander@gmail.com>
Wed, 21 Dec 2011 05:30:16 +0000 (05:30 +0000)
committerCameron Gutman <aicommander@gmail.com>
Wed, 21 Dec 2011 05:30:16 +0000 (05:30 +0000)
- Wait to acquire locks in CcRosFlushDirtyPages
- This is needed because this path is used during critical times like shutdown and very low memory situations when flushes cannot fail

svn path=/trunk/; revision=54725

reactos/ntoskrnl/cc/view.c

index 89167bf..a0a35f6 100644 (file)
@@ -225,20 +225,13 @@ CcRosFlushDirtyPages(ULONG Target, PULONG Count)
         current_entry = current_entry->Flink;
 
         Locked = current->Bcb->Callbacks->AcquireForLazyWrite(
-            current->Bcb->LazyWriteContext, FALSE);
+            current->Bcb->LazyWriteContext, TRUE);
         if (!Locked)
         {
             continue;
         }
         
-        Locked = ExTryToAcquirePushLockExclusive(&current->Lock);
-        if (!Locked)
-        {
-            current->Bcb->Callbacks->ReleaseFromLazyWrite(
-                current->Bcb->LazyWriteContext);
-
-            continue;
-        }
+        ExAcquirePushLockExclusive(&current->Lock);
         
         ASSERT(current->Dirty);
         if (current->ReferenceCount > 1)