X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fntoskrnl%2Fcc%2Fpin.c;h=9159745fb08378422927b42bfd01f327de2f2ab5;hp=3779f6407e2777f921e1769bc4733a3d540a1a18;hb=2a6c4f11194b4f0fca8d6f8a9da4a623147be459;hpb=7c0554a53fe7b42854876d6ea63658acff004b27 diff --git a/reactos/ntoskrnl/cc/pin.c b/reactos/ntoskrnl/cc/pin.c index 3779f6407e2..9159745fb08 100644 --- a/reactos/ntoskrnl/cc/pin.c +++ b/reactos/ntoskrnl/cc/pin.c @@ -187,7 +187,7 @@ CcPinRead ( iBcb->Pinned = TRUE; if (InterlockedIncrement(&iBcb->Vacb->PinCount) == 1) { - KeReleaseMutex(&iBcb->Vacb->Mutex, FALSE); + CcRosReleaseVacbLock(iBcb->Vacb); } if (Flags & PIN_EXCLUSIVE) @@ -283,11 +283,7 @@ CcUnpinDataForThread ( iBcb->Pinned = FALSE; if (InterlockedDecrement(&iBcb->Vacb->PinCount) == 0) { - KeWaitForSingleObject(&iBcb->Vacb->Mutex, - Executive, - KernelMode, - FALSE, - NULL); + CcRosAcquireVacbLock(iBcb->Vacb, NULL); } } @@ -339,11 +335,7 @@ CcUnpinRepinnedBcb ( IoStatus->Information = 0; if (WriteThrough) { - KeWaitForSingleObject(&iBcb->Vacb->Mutex, - Executive, - KernelMode, - FALSE, - NULL); + CcRosAcquireVacbLock(iBcb->Vacb, NULL); if (iBcb->Vacb->Dirty) { IoStatus->Status = CcRosFlushVacb(iBcb->Vacb); @@ -352,7 +344,7 @@ CcUnpinRepinnedBcb ( { IoStatus->Status = STATUS_SUCCESS; } - KeReleaseMutex(&iBcb->Vacb->Mutex, FALSE); + CcRosReleaseVacbLock(iBcb->Vacb); } else { @@ -365,11 +357,7 @@ CcUnpinRepinnedBcb ( iBcb->Pinned = FALSE; if (InterlockedDecrement(&iBcb->Vacb->PinCount) == 0) { - KeWaitForSingleObject(&iBcb->Vacb->Mutex, - Executive, - KernelMode, - FALSE, - NULL); + CcRosAcquireVacbLock(iBcb->Vacb, NULL); } } ExDeleteResourceLite(&iBcb->Lock);