From ea44de691ebad701c849b174dabd376ed6d7d1ae Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Sun, 24 Jan 2021 20:04:08 +0100 Subject: s390/vdso: simplify vdso size calculation The vdso is (and must) be page aligned and its size must also be a multiple of PAGE_SIZE. Therefore no need to round upwards. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- arch/s390/kernel/vdso.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/s390/kernel/vdso.c') diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index 0bb287ae0f04..7075459aed51 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c @@ -170,8 +170,7 @@ static int __init vdso_init(void) int i; /* Calculate the size of the 64 bit vDSO */ - vdso64_pages = ((&vdso64_end - &vdso64_start - + PAGE_SIZE - 1) >> PAGE_SHIFT) + 1; + vdso64_pages = ((&vdso64_end - &vdso64_start) >> PAGE_SHIFT) + 1; /* Make sure pages are in the correct state */ vdso64_pagelist = kcalloc(vdso64_pages + 1, sizeof(struct page *), -- cgit v1.2.3-59-g8ed1b