From 4d1f13cf77f5a734def5c798cbaf95818a43f9e6 Mon Sep 17 00:00:00 2001 From: Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com> Date: Fri, 21 Dec 2018 19:20:59 +0100 Subject: [PATCH] [NTOS:CC] CcCanIWrite(): Use BYTES_TO_PAGES(Length) --- ntoskrnl/cc/copy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ntoskrnl/cc/copy.c b/ntoskrnl/cc/copy.c index 4509e2e43b7..41980b87d45 100644 --- a/ntoskrnl/cc/copy.c +++ b/ntoskrnl/cc/copy.c @@ -685,8 +685,7 @@ CcCanIWrite ( Length = BytesToWrite; } - /* Convert it to pages count */ - Pages = (Length + PAGE_SIZE - 1) >> PAGE_SHIFT; + Pages = BYTES_TO_PAGES(Length); /* By default, assume limits per file won't be hit */ PerFileDefer = FALSE;