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
{
#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);