[PATCH 61/89] sched/headers: Reduce signal API dependency

Ingo Molnar
2017-02-06T13:37:58Z

Instead of including the full <linux/signal.h>, only include the types-only
<linux/signal_types.h> header in <linux/sched.h>, to further decouple the
scheduler header from the signal headers.

Also update <linux/sched/signal.h> which now needs the additional header.

Update the code that relied on sched.h's inclusion of the signal.h header.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/arm64/kernel/sys_compat.c | 1 +
drivers/gpu/drm/i915/i915_gem_request.c | 1 +
drivers/isdn/mISDN/stack.c | 2 ++
fs/btrfs/extent-tree.c | 1 +
fs/btrfs/free-space-cache.c | 1 +
fs/buffer.c | 1 +
fs/ceph/addr.c | 1 +
fs/dax.c | 1 +
fs/ioctl.c | 2 ++
fs/iomap.c | 2 ++
fs/ocfs2/super.c | 1 +
include/linux/sched.h | 2 +-
include/linux/sched/signal.h | 1 +
kernel/pid_namespace.c | 1 +
mm/page-writeback.c | 1 +
15 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/sys_compat.c b/arch/arm64/kernel/sys_compat.c
index abaf582fc7a8..8b8bbd3eaa52 100644
--- a/arch/arm64/kernel/sys_compat.c
+++ b/arch/arm64/kernel/sys_compat.c
@@ -21,6 +21,7 @@
#include <linux/compat.h>
#include <linux/personality.h>
#include <linux/sched.h>
+#include <linux/sched/signal.h>
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <linux/uaccess.h>
diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
index ec024f6e66f9..ffd536917504 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.c
+++ b/drivers/gpu/drm/i915/i915_gem_request.c
@@ -26,6 +26,7 @@
#include <linux/dma-fence-array.h>
#include <linux/sched.h>
#include <linux/sched/clock.h>
+#include <linux/sched/signal.h>

#include "i915_drv.h"

diff --git a/drivers/isdn/mISDN/stack.c b/drivers/isdn/mISDN/stack.c
index b324474c0c12..696f22fd5ab4 100644
--- a/drivers/isdn/mISDN/stack.c
+++ b/drivers/isdn/mISDN/stack.c
@@ -19,6 +19,8 @@
#include <linux/mISDNif.h>
#include <linux/kthread.h>
#include <linux/sched.h>
+#include <linux/signal.h>
+
#include "core.h"

static u_int *debug;
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index dcd2e798767e..d02a21745106 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -16,6 +16,7 @@
* Boston, MA 021110-1307, USA.
*/
#include <linux/sched.h>
+#include <linux/sched/signal.h>
#include <linux/pagemap.h>
#include <linux/writeback.h>
#include <linux/blkdev.h>
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 7015892c9ee8..c653f0d431e7 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -18,6 +18,7 @@

#include <linux/pagemap.h>
#include <linux/sched.h>
+#include <linux/sched/signal.h>
#include <linux/slab.h>
#include <linux/math64.h>
#include <linux/ratelimit.h>
diff --git a/fs/buffer.c b/fs/buffer.c
index 0e87401cf335..92ab391dee55 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -19,6 +19,7 @@
*/

#include <linux/kernel.h>
+#include <linux/sched/signal.h>
#include <linux/syscalls.h>
#include <linux/fs.h>
#include <linux/iomap.h>
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index e4b066cd912a..cdc6a5f3df55 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -8,6 +8,7 @@
#include <linux/slab.h>
#include <linux/pagevec.h>
#include <linux/task_io_accounting_ops.h>
+#include <linux/signal.h>

#include "super.h"
#include "mds_client.h"
diff --git a/fs/dax.c b/fs/dax.c
index 3af2da5e64ce..f10a46d858c0 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -27,6 +27,7 @@
#include <linux/pagevec.h>
#include <linux/pmem.h>
#include <linux/sched.h>
+#include <linux/sched/signal.h>
#include <linux/uio.h>
#include <linux/vmstat.h>
#include <linux/pfn_t.h>
diff --git a/fs/ioctl.c b/fs/ioctl.c
index cb9b02940805..569db68d02b3 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -15,6 +15,8 @@
#include <linux/writeback.h>
#include <linux/buffer_head.h>
#include <linux/falloc.h>
+#include <linux/sched/signal.h>
+
#include "internal.h"

#include <asm/ioctls.h>
diff --git a/fs/iomap.c b/fs/iomap.c
index 354a123f170e..157f7ed024fd 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -26,6 +26,8 @@
#include <linux/buffer_head.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/dax.h>
+#include <linux/sched/signal.h>
+
#include "internal.h"

/*
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index a24e42f95341..ca1646fbcaef 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -42,6 +42,7 @@
#include <linux/seq_file.h>
#include <linux/quotaops.h>
#include <linux/cleancache.h>
+#include <linux/signal.h>

#define CREATE_TRACE_POINTS
#include "ocfs2_trace.h"
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c53bb89bfef7..bcfda8a42d88 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -10,7 +10,7 @@

#include <linux/sem.h>
#include <linux/shm.h>
-#include <linux/signal.h>
+#include <linux/signal_types.h>
#include <linux/pid.h>
#include <linux/seccomp.h>
#include <linux/rculist.h>
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h
index 3841cd2e794d..cad4d6eea663 100644
--- a/include/linux/sched/signal.h
+++ b/include/linux/sched/signal.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_SCHED_SIGNAL_H
#define _LINUX_SCHED_SIGNAL_H

+#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/sched/jobctl.h>
#include <linux/cred.h>
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index 7c8367854dc4..de461aa0bf9a 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -20,6 +20,7 @@
#include <linux/reboot.h>
#include <linux/export.h>
#include <linux/sched/task.h>
+#include <linux/sched/signal.h>

struct pid_cache {
int nr_ids;
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 290e8b7d3181..cd99d3bc162a 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -36,6 +36,7 @@
#include <linux/pagevec.h>
#include <linux/timer.h>
#include <linux/sched/rt.h>
+#include <linux/sched/signal.h>
#include <linux/mm_inline.h>
#include <trace/events/writeback.h>

--
2.7.4