From ba8024a2849d347886328a1148d1ed820869a4e2 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Thu, 10 Jan 2019 14:28:10 -0800 Subject: [PATCH] Linux 5.0 compat: Use totalram_pages() totalram_pages() was converted to an atomic variable in 5.0: https://patchwork.kernel.org/patch/10652795/ Its value should now be read though the totalram_pages() helper function. Reviewed-by: Brian Behlendorf Signed-off-by: Tony Hutter Closes #8263 --- module/zfs/arc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/zfs/arc.c b/module/zfs/arc.c index a7fb2429ec..b218a96e6b 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -4004,9 +4004,9 @@ arc_all_memory(void) { #ifdef _KERNEL #ifdef CONFIG_HIGHMEM - return (ptob(totalram_pages - totalhigh_pages)); + return (ptob(zfs_totalram_pages - totalhigh_pages)); #else - return (ptob(totalram_pages)); + return (ptob(zfs_totalram_pages)); #endif /* CONFIG_HIGHMEM */ #else return (ptob(physmem) / 2);