diff --git a/ntoskrnl/cc/pin.c b/ntoskrnl/cc/pin.c index d96c64bc2fc..3c8747e76b6 100644 --- a/ntoskrnl/cc/pin.c +++ b/ntoskrnl/cc/pin.c @@ -31,12 +31,10 @@ ULONG CcPinReadNoWait = 0; /* FUNCTIONS *****************************************************************/ -/* - * @implemented - */ +static BOOLEAN NTAPI -CcMapData ( +CcpMapData( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, @@ -53,19 +51,6 @@ CcMapData ( LONGLONG ROffset; KIRQL OldIrql; - DPRINT("CcMapData(FileObject 0x%p, FileOffset %I64x, Length %lu, Flags 0x%lx," - " pBcb 0x%p, pBuffer 0x%p)\n", FileObject, FileOffset->QuadPart, - Length, Flags, pBcb, pBuffer); - - if (Flags & MAP_WAIT) - { - ++CcMapDataWait; - } - else - { - ++CcMapDataNoWait; - } - ReadOffset = FileOffset->QuadPart; ASSERT(FileObject); @@ -160,11 +145,44 @@ CcMapData ( InsertTailList(&SharedCacheMap->BcbList, &iBcb->BcbEntry); KeReleaseSpinLock(&SharedCacheMap->BcbSpinLock, OldIrql); - CCTRACE(CC_API_DEBUG, "FileObject=%p FileOffset=%p Length=%lu Flags=0x%lx -> TRUE Bcb=%p\n", - FileObject, FileOffset, Length, Flags, iBcb); return TRUE; } +/* + * @implemented + */ +BOOLEAN +NTAPI +CcMapData ( + IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN ULONG Length, + IN ULONG Flags, + OUT PVOID *pBcb, + OUT PVOID *pBuffer) +{ + BOOLEAN Ret; + + DPRINT("CcMapData(FileObject 0x%p, FileOffset %I64x, Length %lu, Flags 0x%lx," + " pBcb 0x%p, pBuffer 0x%p)\n", FileObject, FileOffset->QuadPart, + Length, Flags, pBcb, pBuffer); + + if (Flags & MAP_WAIT) + { + ++CcMapDataWait; + } + else + { + ++CcMapDataNoWait; + } + + Ret = CcpMapData(FileObject, FileOffset, Length, Flags, pBcb, pBuffer); + + CCTRACE(CC_API_DEBUG, "FileObject=%p FileOffset=%p Length=%lu Flags=0x%lx -> %d Bcb=%p\n", + FileObject, FileOffset, Length, Flags, Ret, *pBcb); + return Ret; +} + /* * @unimplemented */ @@ -246,7 +264,7 @@ CcPinRead ( } /* Map first */ - if (!CcMapData(FileObject, FileOffset, Length, Flags, Bcb, Buffer)) + if (!CcpMapData(FileObject, FileOffset, Length, Flags, Bcb, Buffer)) { return FALSE; }