[NTOKSNRL] Always flush dirty VACB.
[reactos.git] / ntoskrnl / cc / view.c
index d3c32f9..9a7f716 100644 (file)
@@ -207,8 +207,6 @@ CcRosFlushDirtyPages (
 
     while ((current_entry != &DirtyVacbListHead) && (Target > 0))
     {
-        ULONG Refs;
-
         current = CONTAINING_RECORD(current_entry,
                                     ROS_VACB,
                                     DirtyVacbListEntry);
@@ -234,17 +232,6 @@ CcRosFlushDirtyPages (
 
         ASSERT(current->Dirty);
 
-        /* One reference is added above */
-        Refs = CcRosVacbGetRefCount(current);
-        if ((Refs > 3 && current->PinCount == 0) ||
-            (Refs > 4 && current->PinCount > 1))
-        {
-            current->SharedCacheMap->Callbacks->ReleaseFromLazyWrite(
-                current->SharedCacheMap->LazyWriteContext);
-            CcRosVacbDecRefCount(current);
-            continue;
-        }
-
         KeReleaseGuardedMutex(&ViewLock);
 
         Status = CcRosFlushVacb(current);