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 <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #8263
This commit is contained in:
Tony Hutter 2019-01-10 14:28:10 -08:00
parent edc2675aed
commit ba8024a284

View 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);