[NTOSKRNL:CC] Bug Fix

Some test failed due to miss use of ForwardClusterOnly
This commit is contained in:
Dibyamartanda Samanta 2024-08-16 06:45:16 +02:00 committed by CodingWorkshop Signing Team
parent 2530ffd322
commit 688615fa39
Signed by: CodingWorkshop Signing Team
GPG Key ID: 6DC88369C82795D2

View File

@ -90,7 +90,7 @@ CcMapDataForOverwrite(
}
savedState = currentThread->CacheManagerActive + 2 * currentThread->ReadClusterSize;
savedState = currentThread->ForwardClusterOnly + 2 * currentThread->ReadClusterSize;
readClusterSize = currentThread->ReadClusterSize;
CcMapDataCommon(FileObject, FileOffset, Length, TRUE, &outBcb, &localBuffer);
@ -101,7 +101,7 @@ CcMapDataForOverwrite(
while (remainingPages)
{
currentThread->CacheManagerActive = 1;
currentThread->ForwardClusterOnly = 1;
if (--remainingPages > readClusterSize)
{
currentThread->ReadClusterSize = (remainingPages > 0xF) ? 15 : remainingPages;
@ -114,8 +114,8 @@ CcMapDataForOverwrite(
SystemCacheAddress += 4096;
}
currentThread->CacheManagerActive = savedState & 1;
/* Restore to the saved state*/
currentThread->ForwardClusterOnly = savedState & 1;
currentThread->ReadClusterSize = savedState >> 1;
*Bcb = outBcb;
*Buffer = localBuffer;