[KMTESTS:NTOS_MM] Purge & flush cache when there is a data section object.

Those purge & flush the mapped sections too. That's what fastfat_new & other FS drivers do.
This commit is contained in:
Jérôme Gardou 2021-02-04 10:46:31 +01:00
parent 111e40039e
commit d52f937120

View file

@ -417,7 +417,7 @@ TestIrpHandler(
{
LARGE_INTEGER Zero = RTL_CONSTANT_LARGE_INTEGER(0LL);
if (CcIsFileCached(IoStack->FileObject))
if (IoStack->FileObject->SectionObjectPointer->DataSectionObject)
{
CcFlushCache(&Fcb->SectionObjectPointers, NULL, 0, NULL);
CcPurgeCacheSection(&Fcb->SectionObjectPointers, NULL, 0, FALSE);