Linux 2.6.31 Compatibility Updates
SPL_AC_2ARGS_SET_FS_PWD macro updated to explicitly include linux/fs_struct.h which was dropped from linux/sched.h. min_wmark_pages, low_wmark_pages, high_wmark_pages macros introduced in newer kernels. For older kernels mm_compat.h was introduced to define them as needed as direct mappings to per zone min_pages, low_pages, max_pages.
This commit is contained in:
parent
f97cd5fd87
commit
baf2979ed3
|
@ -1266,6 +1266,7 @@ AC_DEFUN([SPL_AC_2ARGS_SET_FS_PWD],
|
||||||
[AC_MSG_CHECKING([whether set_fs_pwd() wants 2 args])
|
[AC_MSG_CHECKING([whether set_fs_pwd() wants 2 args])
|
||||||
SPL_LINUX_TRY_COMPILE([
|
SPL_LINUX_TRY_COMPILE([
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/fs_struct.h>
|
||||||
],[
|
],[
|
||||||
set_fs_pwd(NULL, NULL);
|
set_fs_pwd(NULL, NULL);
|
||||||
],[
|
],[
|
||||||
|
|
|
@ -21871,6 +21871,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
|
||||||
|
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/fs_struct.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
|
@ -25119,6 +25120,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
|
||||||
|
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/fs_struct.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#ifndef _SPL_MM_COMPAT_H
|
||||||
|
#define _SPL_MM_COMPAT_H
|
||||||
|
|
||||||
|
#include <linux/mm.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 */
|
|
@ -36,7 +36,7 @@ extern "C" {
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/vmalloc.h>
|
#include <linux/vmalloc.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm_compat.h>
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
#include <linux/rwsem.h>
|
#include <linux/rwsem.h>
|
||||||
#include <linux/hash.h>
|
#include <linux/hash.h>
|
||||||
|
|
|
@ -39,6 +39,7 @@ extern "C" {
|
||||||
#include <linux/namei.h>
|
#include <linux/namei.h>
|
||||||
#include <linux/file.h>
|
#include <linux/file.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
#include <linux/fs_struct.h>
|
||||||
#include <linux/mount.h>
|
#include <linux/mount.h>
|
||||||
#include <sys/kmem.h>
|
#include <sys/kmem.h>
|
||||||
#include <sys/mutex.h>
|
#include <sys/mutex.h>
|
||||||
|
|
|
@ -1826,9 +1826,9 @@ spl_kmem_init_globals(void)
|
||||||
if (!populated_zone(zone))
|
if (!populated_zone(zone))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
minfree += zone->pages_min;
|
minfree += min_wmark_pages(zone);
|
||||||
desfree += zone->pages_low;
|
desfree += low_wmark_pages(zone);
|
||||||
lotsfree += zone->pages_high;
|
lotsfree += high_wmark_pages(zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Solaris default values */
|
/* Solaris default values */
|
||||||
|
|
Loading…
Reference in New Issue