]> git.proxmox.com Git - mirror_zfs.git/blobdiff - include/spl/sys/vmsystm.h
Linux 5.0 compat: Use totalram_pages()
[mirror_zfs.git] / include / spl / sys / vmsystm.h
index 2b48fe0e3693ff2439d2bfe303539ab6da423ae7..6bdfc852ac0a2c5d3d99dacc65e1384108b25ae9 100644 (file)
 #include <sys/types.h>
 #include <asm/uaccess.h>
 
+#ifdef HAVE_TOTALRAM_PAGES_FUNC
+#define        zfs_totalram_pages      totalram_pages()
+#else
+#define        zfs_totalram_pages      totalram_pages
+#endif
+
 #define        membar_producer()               smp_wmb()
-#define        physmem                         totalram_pages
+#define        physmem                         zfs_totalram_pages
 #define        freemem                 (nr_free_pages() + \
                                global_page_state(NR_INACTIVE_FILE) + \
                                global_page_state(NR_INACTIVE_ANON) + \