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:
parent
edc2675aed
commit
ba8024a284
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue