mirror of
https://github.com/reactos/reactos.git
synced 2025-06-03 08:20:27 +00:00
[NTOS:CC] Always honor WriteThrough parameter in CcUnpinRepinnedBcb
This commit is contained in:
parent
1505abbc09
commit
358d06c47c
1 changed files with 13 additions and 17 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue