]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Linux 5.0 compat: Use totalram_pages()
authorTony Hutter <hutter2@llnl.gov>
Thu, 10 Jan 2019 22:28:10 +0000 (14:28 -0800)
committerTony Hutter <hutter2@llnl.gov>
Fri, 22 Feb 2019 17:47:34 +0000 (09:47 -0800)
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 <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #8263

module/zfs/arc.c

index a7fb2429eced8458b344192539fdd75762566b5d..b218a96e6b04b707efa0d1ae2236782e75a4ae1a 100644 (file)
@@ -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);