[NTOSKRNL] Implement support for PIN_IF_BCB flag
authorPierre Schweitzer <pierre@reactos.org>
Fri, 5 Oct 2018 19:17:38 +0000 (21:17 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Fri, 5 Oct 2018 19:26:16 +0000 (21:26 +0200)
ntoskrnl/cc/pin.c

index f40405e..3e89cac 100644 (file)
@@ -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))
         {