mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
[NTOSKRNL] Use the LockQueueMasterLock where appropriate
This commit is contained in:
parent
19c822341b
commit
323f71a551
3 changed files with 10 additions and 3 deletions
|
@ -628,6 +628,7 @@ CcDeferWrite (
|
||||||
IN ULONG BytesToWrite,
|
IN ULONG BytesToWrite,
|
||||||
IN BOOLEAN Retrying)
|
IN BOOLEAN Retrying)
|
||||||
{
|
{
|
||||||
|
KIRQL OldIrql;
|
||||||
PDEFERRED_WRITE Context;
|
PDEFERRED_WRITE Context;
|
||||||
PFSRTL_COMMON_FCB_HEADER Fcb;
|
PFSRTL_COMMON_FCB_HEADER Fcb;
|
||||||
|
|
||||||
|
@ -675,11 +676,13 @@ CcDeferWrite (
|
||||||
/* Try to execute the posted writes */
|
/* Try to execute the posted writes */
|
||||||
CcPostDeferredWrites();
|
CcPostDeferredWrites();
|
||||||
|
|
||||||
/* FIXME: lock master */
|
/* Schedule a lazy writer run to handle deferred writes */
|
||||||
|
OldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock);
|
||||||
if (!LazyWriter.ScanActive)
|
if (!LazyWriter.ScanActive)
|
||||||
{
|
{
|
||||||
CcScheduleLazyWriteScan(FALSE);
|
CcScheduleLazyWriteScan(FALSE);
|
||||||
}
|
}
|
||||||
|
KeReleaseQueuedSpinLock(LockQueueMasterLock, OldIrql);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -119,7 +119,6 @@ CcScanDpc(
|
||||||
CcPostWorkQueue(WorkItem, &CcRegularWorkQueue);
|
CcPostWorkQueue(WorkItem, &CcRegularWorkQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: handle master lock */
|
|
||||||
VOID
|
VOID
|
||||||
CcLazyWriteScan(VOID)
|
CcLazyWriteScan(VOID)
|
||||||
{
|
{
|
||||||
|
@ -165,6 +164,7 @@ CcLazyWriteScan(VOID)
|
||||||
CcPostDeferredWrites();
|
CcPostDeferredWrites();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Post items that were due for end of run */
|
||||||
while (!IsListEmpty(&ToPost))
|
while (!IsListEmpty(&ToPost))
|
||||||
{
|
{
|
||||||
ListEntry = RemoveHeadList(&ToPost);
|
ListEntry = RemoveHeadList(&ToPost);
|
||||||
|
@ -173,7 +173,9 @@ CcLazyWriteScan(VOID)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We're no longer active */
|
/* We're no longer active */
|
||||||
|
OldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock);
|
||||||
LazyWriter.ScanActive = FALSE;
|
LazyWriter.ScanActive = FALSE;
|
||||||
|
KeReleaseQueuedSpinLock(LockQueueMasterLock, OldIrql);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CcScheduleLazyWriteScan(
|
VOID CcScheduleLazyWriteScan(
|
||||||
|
|
|
@ -520,11 +520,13 @@ CcRosMarkDirtyVacb (
|
||||||
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldIrql);
|
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldIrql);
|
||||||
KeReleaseGuardedMutex(&ViewLock);
|
KeReleaseGuardedMutex(&ViewLock);
|
||||||
|
|
||||||
/* FIXME: lock master */
|
/* Schedule a lazy writer run to now that we have dirty VACB */
|
||||||
|
oldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock);
|
||||||
if (!LazyWriter.ScanActive)
|
if (!LazyWriter.ScanActive)
|
||||||
{
|
{
|
||||||
CcScheduleLazyWriteScan(FALSE);
|
CcScheduleLazyWriteScan(FALSE);
|
||||||
}
|
}
|
||||||
|
KeReleaseQueuedSpinLock(LockQueueMasterLock, oldIrql);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
|
Loading…
Reference in a new issue