[NTOSKRNL] Use the LockQueueMasterLock where appropriate

This commit is contained in:
Pierre Schweitzer 2018-02-07 21:35:22 +01:00
parent 19c822341b
commit 323f71a551
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
3 changed files with 10 additions and 3 deletions

View file

@ -628,6 +628,7 @@ CcDeferWrite (
IN ULONG BytesToWrite,
IN BOOLEAN Retrying)
{
KIRQL OldIrql;
PDEFERRED_WRITE Context;
PFSRTL_COMMON_FCB_HEADER Fcb;
@ -675,11 +676,13 @@ CcDeferWrite (
/* Try to execute the posted writes */
CcPostDeferredWrites();
/* FIXME: lock master */
/* Schedule a lazy writer run to handle deferred writes */
OldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock);
if (!LazyWriter.ScanActive)
{
CcScheduleLazyWriteScan(FALSE);
}
KeReleaseQueuedSpinLock(LockQueueMasterLock, OldIrql);
}
/*

View file

@ -119,7 +119,6 @@ CcScanDpc(
CcPostWorkQueue(WorkItem, &CcRegularWorkQueue);
}
/* FIXME: handle master lock */
VOID
CcLazyWriteScan(VOID)
{
@ -165,6 +164,7 @@ CcLazyWriteScan(VOID)
CcPostDeferredWrites();
}
/* Post items that were due for end of run */
while (!IsListEmpty(&ToPost))
{
ListEntry = RemoveHeadList(&ToPost);
@ -173,7 +173,9 @@ CcLazyWriteScan(VOID)
}
/* We're no longer active */
OldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock);
LazyWriter.ScanActive = FALSE;
KeReleaseQueuedSpinLock(LockQueueMasterLock, OldIrql);
}
VOID CcScheduleLazyWriteScan(

View file

@ -520,11 +520,13 @@ CcRosMarkDirtyVacb (
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldIrql);
KeReleaseGuardedMutex(&ViewLock);
/* FIXME: lock master */
/* Schedule a lazy writer run to now that we have dirty VACB */
oldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock);
if (!LazyWriter.ScanActive)
{
CcScheduleLazyWriteScan(FALSE);
}
KeReleaseQueuedSpinLock(LockQueueMasterLock, oldIrql);
}
VOID