[NTOSKRNL] In CcFlushCache(), release the VACB using CcRosReleaseVacb()

Instead of reimplementing it partially and wrongly.

CORE-14481
CORE-14480
CORE-14482
This commit is contained in:
Pierre Schweitzer 2018-03-18 13:11:05 +01:00
parent da50a61f0f
commit 2fbba22789
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -963,7 +963,6 @@ CcFlushCache (
LONGLONG RemainingLength;
PROS_VACB current;
NTSTATUS Status;
KIRQL oldIrql;
CCTRACE(CC_API_DEBUG, "SectionObjectPointers=%p FileOffset=%p Length=%lu\n",
SectionObjectPointers, FileOffset, Length);
@ -1006,13 +1005,7 @@ CcFlushCache (
}
}
CcRosReleaseVacbLock(current);
KeAcquireGuardedMutex(&ViewLock);
KeAcquireSpinLock(&SharedCacheMap->CacheMapLock, &oldIrql);
CcRosVacbDecRefCount(current);
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldIrql);
KeReleaseGuardedMutex(&ViewLock);
CcRosReleaseVacb(SharedCacheMap, current, current->Valid, current->Dirty, FALSE);
}
Offset.QuadPart += VACB_MAPPING_GRANULARITY;