From 1a267045f8cd36de9eb7542bef9a2fd7d34e0b09 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 23 Dec 2018 12:10:58 +0100 Subject: [PATCH] [NTOSKRNL] Honor files that shouldn't be lazy written --- ntoskrnl/cc/view.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c index d64496595f4..890c75e99cd 100644 --- a/ntoskrnl/cc/view.c +++ b/ntoskrnl/cc/view.c @@ -222,6 +222,14 @@ CcRosFlushDirtyPages ( continue; } + /* Don't attempt to lazy write the files that asked not to */ + if (CalledFromLazy && + BooleanFlagOn(current->SharedCacheMap->Flags, WRITEBEHIND_DISABLED)) + { + CcRosVacbDecRefCount(current); + continue; + } + ASSERT(current->Dirty); KeReleaseQueuedSpinLock(LockQueueMasterLock, OldIrql);