diff --git a/config/spl-build.m4 b/config/spl-build.m4 index ae45e29da4..f50e1757fb 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1266,6 +1266,7 @@ AC_DEFUN([SPL_AC_2ARGS_SET_FS_PWD], [AC_MSG_CHECKING([whether set_fs_pwd() wants 2 args]) SPL_LINUX_TRY_COMPILE([ #include + #include ],[ set_fs_pwd(NULL, NULL); ],[ diff --git a/configure b/configure index 15fea65f98..3beeb5df06 100755 --- a/configure +++ b/configure @@ -21871,6 +21871,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include + #include int main (void) @@ -25119,6 +25120,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include + #include int main (void) diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h new file mode 100644 index 0000000000..c99027b44a --- /dev/null +++ b/include/linux/mm_compat.h @@ -0,0 +1,22 @@ +#ifndef _SPL_MM_COMPAT_H +#define _SPL_MM_COMPAT_H + +#include + +/* + * Linux 2.6.31 API Change. + * Individual pages_{min,low,high} moved in to watermark array. + */ +#ifndef min_wmark_pages +#define min_wmark_pages(z) (z->pages_min) +#endif + +#ifndef low_wmark_pages +#define low_wmark_pages(z) (z->pages_low) +#endif + +#ifndef high_wmark_pages +#define high_wmark_pages(z) (z->pages_high) +#endif + +#endif /* SPL_MM_COMPAT_H */ diff --git a/include/sys/kmem.h b/include/sys/kmem.h index 7cfbc49e55..3e5eb204f9 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -36,7 +36,7 @@ extern "C" { #include #include #include -#include +#include #include #include #include diff --git a/include/sys/vnode.h b/include/sys/vnode.h index d8a8df2722..9568a13926 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -39,6 +39,7 @@ extern "C" { #include #include #include +#include #include #include #include diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 00d37c798f..79a7028c2f 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -1826,9 +1826,9 @@ spl_kmem_init_globals(void) if (!populated_zone(zone)) continue; - minfree += zone->pages_min; - desfree += zone->pages_low; - lotsfree += zone->pages_high; + minfree += min_wmark_pages(zone); + desfree += low_wmark_pages(zone); + lotsfree += high_wmark_pages(zone); } /* Solaris default values */