summaryrefslogtreecommitdiffstats
path: root/module/splat
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/splat
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/splat')
-rw-r--r--module/splat/splat-atomic.c1
-rw-r--r--module/splat/splat-ctl.c15
-rw-r--r--module/splat/splat-generic.c1
-rw-r--r--module/splat/splat-linux.c1
-rw-r--r--module/splat/splat-mutex.c2
-rw-r--r--module/splat/splat-rwlock.c4
-rw-r--r--module/splat/splat-taskq.c5
-rw-r--r--module/splat/splat-thread.c2
-rw-r--r--module/splat/splat-time.c1
9 files changed, 22 insertions, 10 deletions
diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c
index 7a1bd859d..a270dc42f 100644
--- a/module/splat/splat-atomic.c
+++ b/module/splat/splat-atomic.c
@@ -27,6 +27,7 @@
#include <sys/atomic.h>
#include <sys/thread.h>
#include <sys/mutex.h>
+#include <linux/mm_compat.h>
#include <linux/slab.h>
#include "splat-internal.h"
diff --git a/module/splat/splat-ctl.c b/module/splat/splat-ctl.c
index 46bc6d1a6..bedf5d2d8 100644
--- a/module/splat/splat-ctl.c
+++ b/module/splat/splat-ctl.c
@@ -43,16 +43,17 @@
* of regression tests or particular tests.
\*****************************************************************************/
-#include <linux/module.h>
-#include <linux/slab.h>
-#include <linux/vmalloc.h>
+#include <sys/debug.h>
+#include <sys/mutex.h>
+#include <sys/types.h>
#include <linux/cdev.h>
#include <linux/fs.h>
-#include <linux/uaccess.h>
#include <linux/miscdevice.h>
-#include <sys/types.h>
-#include <sys/debug.h>
-#include <sys/mutex.h>
+#include <linux/module.h>
+#include <linux/module_compat.h>
+#include <linux/slab.h>
+#include <linux/uaccess.h>
+#include <linux/vmalloc.h>
#include "splat-internal.h"
static struct list_head splat_module_list;
diff --git a/module/splat/splat-generic.c b/module/splat/splat-generic.c
index ad03651d0..3f8119b1e 100644
--- a/module/splat/splat-generic.c
+++ b/module/splat/splat-generic.c
@@ -25,6 +25,7 @@
\*****************************************************************************/
#include <sys/sunddi.h>
+#include <linux/math64_compat.h>
#include "splat-internal.h"
#define SPLAT_GENERIC_NAME "generic"
diff --git a/module/splat/splat-linux.c b/module/splat/splat-linux.c
index 880b30152..3652267f9 100644
--- a/module/splat/splat-linux.c
+++ b/module/splat/splat-linux.c
@@ -24,6 +24,7 @@
\*****************************************************************************/
#include <sys/kmem.h>
+#include <linux/mm_compat.h>
#include "splat-internal.h"
#define SPLAT_LINUX_NAME "linux"
diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c
index cc1d36869..909d730cb 100644
--- a/module/splat/splat-mutex.c
+++ b/module/splat/splat-mutex.c
@@ -26,6 +26,8 @@
#include <sys/mutex.h>
#include <sys/taskq.h>
+#include <linux/delay.h>
+#include <linux/mm_compat.h>
#include "splat-internal.h"
#define SPLAT_MUTEX_NAME "mutex"
diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c
index 6faf7d24e..6c623792e 100644
--- a/module/splat/splat-rwlock.c
+++ b/module/splat/splat-rwlock.c
@@ -24,9 +24,11 @@
* Solaris Porting LAyer Tests (SPLAT) Read/Writer Lock Tests.
\*****************************************************************************/
+#include <sys/random.h>
#include <sys/rwlock.h>
#include <sys/taskq.h>
-#include <sys/random.h>
+#include <linux/delay.h>
+#include <linux/mm_compat.h>
#include "splat-internal.h"
#define SPLAT_RWLOCK_NAME "rwlock"
diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c
index 33e49b2f1..6c2b43579 100644
--- a/module/splat/splat-taskq.c
+++ b/module/splat/splat-taskq.c
@@ -24,9 +24,10 @@
* Solaris Porting LAyer Tests (SPLAT) Task Queue Tests.
\*****************************************************************************/
-#include <sys/taskq.h>
-#include <sys/random.h>
#include <sys/kmem.h>
+#include <sys/random.h>
+#include <sys/taskq.h>
+#include <linux/delay.h>
#include "splat-internal.h"
#define SPLAT_TASKQ_NAME "taskq"
diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c
index e55acd0c8..3255e37e5 100644
--- a/module/splat/splat-thread.c
+++ b/module/splat/splat-thread.c
@@ -26,6 +26,8 @@
#include <sys/thread.h>
#include <sys/random.h>
+#include <linux/delay.h>
+#include <linux/mm_compat.h>
#include <linux/slab.h>
#include "splat-internal.h"
diff --git a/module/splat/splat-time.c b/module/splat/splat-time.c
index cd513c93f..b4e94c866 100644
--- a/module/splat/splat-time.c
+++ b/module/splat/splat-time.c
@@ -25,6 +25,7 @@
\*****************************************************************************/
#include <sys/time.h>
+#include <linux/mm_compat.h>
#include <linux/slab.h>
#include "splat-internal.h"