https://git.reactos.org/?p=reactos.git;a=commitdiff;h=19c822341ba5ba29761b6…
commit 19c822341ba5ba29761b6ae1449e99789122396e
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Wed Feb 7 21:11:39 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Wed Feb 7 21:37:17 2018 +0100
[NTOSKRNL] Handle FSRTL_FLAG_LIMIT_MODIFIED_PAGES flag in CcDeferWrite().
Util now, CcDeferWrite() was ignoring limits per file object.
---
ntoskrnl/cc/copy.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ntoskrnl/cc/copy.c b/ntoskrnl/cc/copy.c
index 30360b6c31..7a84e23fb9 100644
--- a/ntoskrnl/cc/copy.c
+++ b/ntoskrnl/cc/copy.c
@@ -629,6 +629,7 @@ CcDeferWrite (
IN BOOLEAN Retrying)
{
PDEFERRED_WRITE Context;
+ PFSRTL_COMMON_FCB_HEADER Fcb;
CCTRACE(CC_API_DEBUG, "FileObject=%p PostRoutine=%p Context1=%p Context2=%p
BytesToWrite=%lu Retrying=%d\n",
FileObject, PostRoutine, Context1, Context2, BytesToWrite, Retrying);
@@ -642,6 +643,8 @@ CcDeferWrite (
return;
}
+ Fcb = FileObject->FsContext;
+
/* Otherwise, initialize the context */
RtlZeroMemory(Context, sizeof(DEFERRED_WRITE));
Context->NodeTypeCode = NODE_TYPE_DEFERRED_WRITE;
@@ -651,6 +654,7 @@ CcDeferWrite (
Context->Context1 = Context1;
Context->Context2 = Context2;
Context->BytesToWrite = BytesToWrite;
+ Context->LimitModifiedPages = BooleanFlagOn(Fcb->Flags,
FSRTL_FLAG_LIMIT_MODIFIED_PAGES);
/* And queue it */
if (Retrying)