https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bd39459f89da7e5031b2b…
commit bd39459f89da7e5031b2b30266521df362759e52
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Fri Oct 5 21:17:38 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Fri Oct 5 21:26:16 2018 +0200
[NTOSKRNL] Implement support for PIN_IF_BCB flag
---
ntoskrnl/cc/pin.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ntoskrnl/cc/pin.c b/ntoskrnl/cc/pin.c
index f40405e6c5..3e89cacddf 100644
--- a/ntoskrnl/cc/pin.c
+++ b/ntoskrnl/cc/pin.c
@@ -329,6 +329,12 @@ CcPinRead (
if (iBcb == NULL)
{
+ /* We failed to find an already existing BCB */
+ if (BooleanFlagOn(Flags, PIN_IF_BCB))
+ {
+ return FALSE;
+ }
+
/* Map first */
if (!CcpMapData(SharedCacheMap, FileOffset, Length, Flags, Bcb, Buffer))
{