sys: FspReleaseForCcFlush: another bug fix for crazy NTOS semantics on this callback

This commit is contained in:
Bill Zissimopoulos 2016-04-18 12:13:33 -07:00
parent 7025dd5cf0
commit 6dd6ec6b47

View File

@ -171,11 +171,11 @@ NTSTATUS FspReleaseForCcFlush(
PIRP TopLevelIrp = IoGetTopLevelIrp();
ULONG TopFlags;
ASSERT((PIRP)FSRTL_CACHE_TOP_LEVEL_IRP == TopLevelIrp ||
(PIRP)FSRTL_MAX_TOP_LEVEL_IRP_FLAG < TopLevelIrp);
if ((PIRP)FSRTL_CACHE_TOP_LEVEL_IRP == TopLevelIrp)
if ((PIRP)FSRTL_MAX_TOP_LEVEL_IRP_FLAG >= TopLevelIrp)
{
IoSetTopLevelIrp(FileNode->Tls.CcFlush.TopLevelIrp);
ASSERT(0 == TopLevelIrp || (PIRP)FSRTL_CACHE_TOP_LEVEL_IRP == TopLevelIrp);
if ((PIRP)FSRTL_CACHE_TOP_LEVEL_IRP == TopLevelIrp)
IoSetTopLevelIrp(FileNode->Tls.CcFlush.TopLevelIrp);
FileNode->Tls.CcFlush.TopLevelIrp = 0;
FspFileNodeRelease(FileNode, Full);
}