aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-11-10 14:06:57 -0800
committerBrian Behlendorf <[email protected]>2009-11-10 14:06:57 -0800
commitbaf2979ed35c1a9c2e90e84416e220ab3d25140a (patch)
tree9040926a680c1a31ae6734cd5f014cbfc1d7e1d3 /include/linux
parentf97cd5fd875e8c28c6411ef86845ad0ec283f115 (diff)
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.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm_compat.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h
new file mode 100644
index 000000000..c99027b44
--- /dev/null
+++ b/include/linux/mm_compat.h
@@ -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 */