https://git.reactos.org/?p=reactos.git;a=commitdiff;h=18f392272510ebcecf0fa9...
commit 18f392272510ebcecf0fa922f58024e3cbd3b568 Author: Pierre Schweitzer pierre@reactos.org AuthorDate: Sat Oct 27 09:30:22 2018 +0200 Commit: Pierre Schweitzer pierre@reactos.org CommitDate: Sat Oct 27 09:38:55 2018 +0200
[NTOSKRNL] Call internal helper to get VACB on mapping We already properly round our offset --- ntoskrnl/cc/pin.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/ntoskrnl/cc/pin.c b/ntoskrnl/cc/pin.c index d972f8a75d..dc7427427e 100644 --- a/ntoskrnl/cc/pin.c +++ b/ntoskrnl/cc/pin.c @@ -78,7 +78,7 @@ CcpMapData( OUT PROS_VACB *pVacb, OUT PVOID *pBuffer) { - LONGLONG ReadOffset; + LONGLONG ReadOffset, BaseOffset; BOOLEAN Valid; PROS_VACB Vacb; NTSTATUS Status; @@ -109,12 +109,14 @@ CcpMapData( } }
+ /* Properly round offset and call internal helper for getting a VACB */ ROffset = ROUND_DOWN(ReadOffset, VACB_MAPPING_GRANULARITY); - Status = CcRosRequestVacb(SharedCacheMap, - ROffset, - pBuffer, - &Valid, - &Vacb); + Status = CcRosGetVacb(SharedCacheMap, + ROffset, + &BaseOffset, + pBuffer, + &Valid, + &Vacb); if (!NT_SUCCESS(Status)) { CCTRACE(CC_API_DEBUG, "FileObject=%p FileOffset=%p Length=%lu Flags=0x%lx -> FALSE\n",