BOOLEAN Locked;
NTSTATUS Status;
KIRQL OldIrql;
+ BOOLEAN FlushAll = (Target == MAXULONG);
DPRINT("CcRosFlushDirtyPages(Target %lu)\n", Target);
DPRINT("No Dirty pages\n");
}
- while ((current_entry != &DirtyVacbListHead) && (Target > 0))
+ while (((current_entry != &DirtyVacbListHead) && (Target > 0)) || FlushAll)
{
+ if (current_entry == &DirtyVacbListHead)
+ {
+ ASSERT(FlushAll);
+ if (IsListEmpty(&DirtyVacbListHead))
+ break;
+ current_entry = DirtyVacbListHead.Flink;
+ }
+
current = CONTAINING_RECORD(current_entry,
ROS_VACB,
DirtyVacbListEntry);
#ifndef NEWCC
/* Flush dirty cache pages */
/* XXX: Is that still mandatory? As now we'll wait on lazy writer to complete? */
- CcRosFlushDirtyPages(-1, &Dummy, TRUE, FALSE); //HACK: We really should wait here!
+ CcRosFlushDirtyPages(MAXULONG, &Dummy, TRUE, FALSE); //HACK: We really should wait here!
#else
Dummy = 0;
#endif