https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cc54e51495f99a90df3bb…
commit cc54e51495f99a90df3bb46eacc6f6aead518ca5
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Mon Apr 30 10:36:19 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Mon Apr 30 10:36:19 2018 +0200
[NTOSKRNL] Unmark dirty first, and then write.
This will avoid trying to flush twice a dirty VACB under
high IOs pressure.
CORE-14584
---
ntoskrnl/cc/view.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c
index e1d064312f..5bd1f41411 100644
--- a/ntoskrnl/cc/view.c
+++ b/ntoskrnl/cc/view.c
@@ -168,10 +168,12 @@ CcRosFlushVacb (
{
NTSTATUS Status;
+ CcRosUnmarkDirtyVacb(Vacb, TRUE);
+
Status = CcWriteVirtualAddress(Vacb);
- if (NT_SUCCESS(Status))
+ if (!NT_SUCCESS(Status))
{
- CcRosUnmarkDirtyVacb(Vacb, TRUE);
+ CcRosMarkDirtyVacb(Vacb);
}
return Status;