Whamcloud - gitweb
LU-9558 libcfs: include new sched directory headers 57/27557/2
authorJames Simmons <uja.ornl@yahoo.com>
Sat, 10 Jun 2017 18:47:40 +0000 (14:47 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 16 Jun 2017 16:57:33 +0000 (16:57 +0000)
Starting in linux kernel version 4.11 the very large
sched.h header is not being broken up into smaller
headers that are placed in linux/sched/*. This patch
handles this small change.

Test-Parameters: trivial

Change-Id: I82ba8ced17f7570fe052777d970a769f1dd366da
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/27557
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/autoconf/lustre-libcfs.m4
libcfs/include/libcfs/linux/libcfs.h
lustre/include/lustre_lib.h

index 826fc1a..1e6f326 100644 (file)
@@ -660,6 +660,17 @@ cpu_hotplug_state_machine, [
 ]) # LIBCFS_HOTPLUG_STATE_MACHINE
 
 #
+# LIBCFS_SCHED_HEADERS
+#
+# 4.11 has broken up sched.h into more headers.
+#
+AC_DEFUN([LIBCFS_SCHED_HEADERS], [
+LB_CHECK_LINUX_HEADER([linux/sched/signal.h], [
+       AC_DEFINE(HAVE_SCHED_HEADERS, 1,
+               [linux/sched header directory exist])])
+]) # LIBCFS_SCHED_HEADERS
+
+#
 # LIBCFS_PROG_LINUX
 #
 # LibCFS linux kernel checks
@@ -725,6 +736,8 @@ LIBCFS_STACKTRACE_OPS
 LIBCFS_GET_USER_PAGES_GUP_FLAGS
 # 4.10
 LIBCFS_HOTPLUG_STATE_MACHINE
+# 4.11
+LIBCFS_SCHED_HEADERS
 ]) # LIBCFS_PROG_LINUX
 
 #
index b5f84f0..7f8f97b 100644 (file)
 #include <linux/rwsem.h>
 #include <linux/scatterlist.h>
 #include <linux/sched.h>
+#ifdef HAVE_SCHED_HEADERS
+#include <linux/sched/signal.h>
+#include <linux/sched/mm.h>
+#endif
 #include <linux/signal.h>
 #include <linux/slab.h>
 #include <linux/smp.h>
index ad7a8c6..5d1d4a1 100644 (file)
@@ -42,7 +42,6 @@
  * @{
  */
 
-#include <linux/signal.h>
 #include <libcfs/libcfs.h>
 #include <lustre/lustre_idl.h>
 #include <lustre_ver.h>