mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 13:34:53 +00: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 */
|
/* Check if we're still in an invalid status */
|
||||||
if (!NT_SUCCESS(Status)) break;
|
if (!NT_SUCCESS(Status)) break;
|
||||||
|
|
||||||
|
/* Flush all volumes and the registry */
|
||||||
|
DPRINT("Flushing volumes\n");
|
||||||
|
PopFlushVolumes(PopAction.Shutdown);
|
||||||
|
|
||||||
#ifndef NEWCC
|
#ifndef NEWCC
|
||||||
/* Flush dirty cache pages */
|
/* Flush dirty cache pages */
|
||||||
/* XXX: Is that still mandatory? As now we'll wait on lazy writer to complete? */
|
/* 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
|
#else
|
||||||
Dummy = 0;
|
Dummy = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Flush all volumes and the registry */
|
|
||||||
DPRINT("Flushing volumes, cache flushed %lu pages\n", Dummy);
|
|
||||||
PopFlushVolumes(PopAction.Shutdown);
|
|
||||||
|
|
||||||
/* Set IRP for drivers */
|
/* Set IRP for drivers */
|
||||||
PopAction.IrpMinor = IRP_MN_SET_POWER;
|
PopAction.IrpMinor = IRP_MN_SET_POWER;
|
||||||
if (PopAction.Shutdown)
|
if (PopAction.Shutdown)
|
||||||
|
|
Loading…
Reference in a new issue