summaryrefslogtreecommitdiffstats
path: root/kernel/mm/mincore.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/mm/mincore.c')
-rw-r--r--kernel/mm/mincore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/mm/mincore.c b/kernel/mm/mincore.c
index be25efde6..14bb9fb37 100644
--- a/kernel/mm/mincore.c
+++ b/kernel/mm/mincore.c
@@ -234,7 +234,7 @@ SYSCALL_DEFINE3(mincore, unsigned long, start, size_t, len,
/* This also avoids any overflows on PAGE_CACHE_ALIGN */
pages = len >> PAGE_SHIFT;
- pages += (len & ~PAGE_MASK) != 0;
+ pages += (offset_in_page(len)) != 0;
if (!access_ok(VERIFY_WRITE, vec, pages))
return -EFAULT;