aboutsummaryrefslogtreecommitdiffstats
path: root/module/spl/spl-kmem.c
diff options
context:
space:
mode:
authorNed Bass <[email protected]>2014-11-14 10:18:05 -0800
committerBrian Behlendorf <[email protected]>2014-11-19 10:35:12 -0800
commit52479ecf58fa89190e384edcf838fecccc786af5 (patch)
tree6adb263086d8f7cc4ced0c81f217cb67dfb45d09 /module/spl/spl-kmem.c
parent8d9a23e82cea5d897e9357d569ef364106703d5a (diff)
Remove compat includes from sys/types.h
Don't include the compatibility code in linux/*_compat.h in the public header sys/types.h. This causes problems when an external code base includes the ZFS headers and has its own conflicting compatibility code. Lustre, in particular, defined SHRINK_STOP for compatibility with pre-3.12 kernels in a way that conflicted with the SPL's definition. Because Lustre ZFS OSD includes ZFS headers it fails to build due to a '"SHRINK_STOP" redefined' compiler warning. To avoid such conflicts only include the compat headers from .c files or private headers. Also, for consistency, include sys/*.h before linux/*.h then sort by header name. Signed-off-by: Ned Bass <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #411
Diffstat (limited to 'module/spl/spl-kmem.c')
-rw-r--r--module/spl/spl-kmem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
index 37849f504..502f5365b 100644
--- a/module/spl/spl-kmem.c
+++ b/module/spl/spl-kmem.c
@@ -25,6 +25,8 @@
\*****************************************************************************/
#include <sys/kmem.h>
+#include <linux/mm_compat.h>
+#include <linux/wait_compat.h>
/*
* Within the scope of spl-kmem.c file the kmem_cache_* definitions