[NTOSKRNL] Handle the PIN_WAIT flag in CcPinMappedData()

This commit is contained in:
Pierre Schweitzer 2018-08-26 22:04:46 +02:00
parent 469e15c7ae
commit c1dd4c142f
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -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;
}
/*