mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 14:34:57 +08:00
[NTOS:CC] Always honor WriteThrough parameter in CcUnpinRepinnedBcb
This commit is contained in:
@@ -629,29 +629,25 @@ CcUnpinRepinnedBcb (
|
||||
SharedCacheMap = iBcb->Vacb->SharedCacheMap;
|
||||
IoStatus->Status = STATUS_SUCCESS;
|
||||
|
||||
if (WriteThrough)
|
||||
{
|
||||
CcFlushCache(iBcb->Vacb->SharedCacheMap->FileObject->SectionObjectPointer,
|
||||
&iBcb->PFCB.MappedFileOffset,
|
||||
iBcb->PFCB.MappedLength,
|
||||
IoStatus);
|
||||
}
|
||||
else
|
||||
{
|
||||
IoStatus->Status = STATUS_SUCCESS;
|
||||
IoStatus->Information = 0;
|
||||
}
|
||||
|
||||
KeAcquireSpinLock(&SharedCacheMap->BcbSpinLock, &OldIrql);
|
||||
if (--iBcb->RefCount == 0)
|
||||
{
|
||||
RemoveEntryList(&iBcb->BcbEntry);
|
||||
KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql);
|
||||
|
||||
IoStatus->Information = 0;
|
||||
if (WriteThrough)
|
||||
{
|
||||
if (iBcb->Vacb->Dirty)
|
||||
{
|
||||
IoStatus->Status = CcRosFlushVacb(iBcb->Vacb);
|
||||
}
|
||||
else
|
||||
{
|
||||
IoStatus->Status = STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
IoStatus->Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (iBcb->PinCount != 0)
|
||||
{
|
||||
ExReleaseResourceLite(&iBcb->Lock);
|
||||
|
||||
Reference in New Issue
Block a user