[NTOSKRNL] Don't defer write through write operations

This commit is contained in:
Pierre Schweitzer 2018-02-09 12:25:58 +01:00
parent d35243d4e0
commit f51b74ca61
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -622,6 +622,12 @@ CcCanIWrite (
CCTRACE(CC_API_DEBUG, "FileObject=%p BytesToWrite=%lu Wait=%d Retrying=%d\n", CCTRACE(CC_API_DEBUG, "FileObject=%p BytesToWrite=%lu Wait=%d Retrying=%d\n",
FileObject, BytesToWrite, Wait, Retrying); FileObject, BytesToWrite, Wait, Retrying);
/* Write through is always OK */
if (BooleanFlagOn(FileObject->Flags, FO_WRITE_THROUGH))
{
return TRUE;
}
/* We cannot write if dirty pages count is above threshold */ /* We cannot write if dirty pages count is above threshold */
if (CcTotalDirtyPages > CcDirtyPageThreshold) if (CcTotalDirtyPages > CcDirtyPageThreshold)
{ {