https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c1dd4c142f21d3584e2da…
commit c1dd4c142f21d3584e2dab979a141f3dac83f073
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sun Aug 26 22:04:46 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sun Aug 26 22:05:11 2018 +0200
[NTOSKRNL] Handle the PIN_WAIT flag in CcPinMappedData()
---
ntoskrnl/cc/pin.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/ntoskrnl/cc/pin.c b/ntoskrnl/cc/pin.c
index 8b99b8c210..0eaf502305 100644
--- a/ntoskrnl/cc/pin.c
+++ b/ntoskrnl/cc/pin.c
@@ -161,6 +161,7 @@ CcPinMappedData (
IN ULONG Flags,
OUT PVOID * Bcb)
{
+ BOOLEAN Result;
PINTERNAL_BCB iBcb;
PROS_SHARED_CACHE_MAP SharedCacheMap;
@@ -181,16 +182,16 @@ CcPinMappedData (
iBcb->Pinned = TRUE;
iBcb->Vacb->PinCount++;
- if (Flags & PIN_EXCLUSIVE)
+ if (BooleanFlagOn(Flags, PIN_EXCLUSIVE))
{
- ExAcquireResourceExclusiveLite(&iBcb->Lock, TRUE);
+ Result = ExAcquireResourceExclusiveLite(&iBcb->Lock, BooleanFlagOn(Flags,
PIN_WAIT));
}
else
{
- ExAcquireResourceSharedLite(&iBcb->Lock, TRUE);
+ Result = ExAcquireResourceSharedLite(&iBcb->Lock, BooleanFlagOn(Flags,
PIN_WAIT));
}
- return TRUE;
+ return Result;
}
/*