sys: FspReleaseForModWrite

In some rare cases and under load the mapped page writer's TopLevelIrp
may be trashed by some outside component (observed on Windows 10 1909).

For this reason remove an assertion that could trigger in debug builds.
This commit is contained in:
Bill Zissimopoulos 2023-01-09 15:30:42 +00:00
parent 760c2acded
commit d626fb9563

View File

@ -154,8 +154,16 @@ NTSTATUS FspReleaseForModWrite(
FSP_FILE_NODE *FileNode = FileObject->FsContext; FSP_FILE_NODE *FileNode = FileObject->FsContext;
/*
* In some rare cases and under load the mapped page writer's TopLevelIrp
* may be trashed by some outside component (observed on Windows 10 1909).
*/
PIRP TopLevelIrp = IoGetTopLevelIrp();
IoSetTopLevelIrp((PIRP)FSRTL_MOD_WRITE_TOP_LEVEL_IRP);
FspFileNodeRelease(FileNode, Full); FspFileNodeRelease(FileNode, Full);
ASSERT((PIRP)FSRTL_MOD_WRITE_TOP_LEVEL_IRP == IoGetTopLevelIrp());
IoSetTopLevelIrp(TopLevelIrp);
FSP_LEAVE("FileObject=%p", FileObject); FSP_LEAVE("FileObject=%p", FileObject);
} }