https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e39fc52d25a577b3c5abd9a9c9b5d20508c42d88

commit e39fc52d25a577b3c5abd9a9c9b5d20508c42d88
Author:     Jérôme Gardou <[email protected]>
AuthorDate: Fri Dec 4 09:10:59 2020 +0100
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Wed Feb 3 09:41:22 2021 +0100

    [NTOS/MM] Set FSRTL_MOD_WRITE_TOP_LEVEL_IRP top-level IRP when paging-out
---
 ntoskrnl/mm/section.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c
index 6b6a6cb94be..866b90810e0 100644
--- a/ntoskrnl/mm/section.c
+++ b/ntoskrnl/mm/section.c
@@ -4685,9 +4685,16 @@ MmCheckDirtySegment(
 
         MmUnlockSectionSegment(Segment);
 
+        /* Tell the FS driver who we are */
+        if (PageOut)
+            IoSetTopLevelIrp((PIRP)FSRTL_MOD_WRITE_TOP_LEVEL_IRP);
+
         /* Go ahead and write the page */
         Status = MiWritePage(Segment, Offset->QuadPart, Page);
 
+        if (PageOut)
+            IoSetTopLevelIrp(NULL);
+
         MmLockSectionSegment(Segment);
 
         /* Get the entry again */

Reply via email to