mirror of
https://github.com/reactos/reactos.git
synced 2024-12-01 07:23:33 +08:00
[NTOS:PO] Flush dirty pages after flushing volumes
This commit is contained in:
parent
5949d5095d
commit
48e1c8593f
@ -1072,18 +1072,19 @@ NtSetSystemPowerState(IN POWER_ACTION SystemAction,
|
||||
/* Check if we're still in an invalid status */
|
||||
if (!NT_SUCCESS(Status)) break;
|
||||
|
||||
/* Flush all volumes and the registry */
|
||||
DPRINT("Flushing volumes\n");
|
||||
PopFlushVolumes(PopAction.Shutdown);
|
||||
|
||||
#ifndef NEWCC
|
||||
/* Flush dirty cache pages */
|
||||
/* XXX: Is that still mandatory? As now we'll wait on lazy writer to complete? */
|
||||
CcRosFlushDirtyPages(MAXULONG, &Dummy, TRUE, FALSE); //HACK: We really should wait here!
|
||||
CcRosFlushDirtyPages(MAXULONG, &Dummy, TRUE, FALSE);
|
||||
DPRINT("Cache flushed %lu pages\n", Dummy);
|
||||
#else
|
||||
Dummy = 0;
|
||||
#endif
|
||||
|
||||
/* Flush all volumes and the registry */
|
||||
DPRINT("Flushing volumes, cache flushed %lu pages\n", Dummy);
|
||||
PopFlushVolumes(PopAction.Shutdown);
|
||||
|
||||
/* Set IRP for drivers */
|
||||
PopAction.IrpMinor = IRP_MN_SET_POWER;
|
||||
if (PopAction.Shutdown)
|
||||
|
Loading…
Reference in New Issue
Block a user