From 372c1254a10712f04cc47fa96b6627b58f091eb6 Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Tue, 11 Aug 2026 14:51:44 -0400 Subject: headers: Remove swap.h from suspend.h Nothing in suspend.h needs swap.h. However, many files indirectly depend on some of swap.h's dependencies, so this is a large cross-subsystem patch. Stats: 42 are missing includes of interrupt.h (the question of why swap.h brings in interrupt.h remains unanswered). 10 missing includes of seq_file.h 5 missing includes of swap.h (obviously all files could have just added swap.h, but I preferred to bring in a more minimal inclusion set) 3 missing includes of highmem.h 2 missing includes of device.h 2 missing includes of string_choices.h 1 missing include of cacheflush.h 1 missing include of dma-direction.h 1 missing include of kthread.h 1 missing include of pagemap.h 1 missing include of string_helpers.h 1 missing include of writeback.h I tried to follow whatever conventions appeared to be in use for the various subsystems I touched; for example I added string_choices.h to drm_print.h instead of individually to each driver which used the functions declared there. Signed-off-by: Matthew Wilcox (Oracle) --- include/drm/drm_print.h | 1 + include/linux/i3c/master.h | 1 + include/linux/suspend.h | 1 - include/sound/cs35l41.h | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index 2adc5ac688e1..8ab7545f2786 100644 --- a/include/drm/drm_print.h +++ b/include/drm/drm_print.h @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h index 4d2a68793324..b74ccfa12548 100644 --- a/include/linux/i3c/master.h +++ b/include/linux/i3c/master.h @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/include/linux/suspend.h b/include/linux/suspend.h index b02876f1ae38..b1a1db042a45 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -2,7 +2,6 @@ #ifndef _LINUX_SUSPEND_H #define _LINUX_SUSPEND_H -#include #include #include #include diff --git a/include/sound/cs35l41.h b/include/sound/cs35l41.h index 7542cabfa726..c97db5816502 100644 --- a/include/sound/cs35l41.h +++ b/include/sound/cs35l41.h @@ -11,6 +11,7 @@ #define __CS35L41_H #include +#include #include #define CS35L41_FIRSTREG 0x00000000 -- cgit v1.2.3 From 59df3f69b3da1b7553f107c948308bbdce4acedd Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Mon, 10 Aug 2026 16:12:43 -0400 Subject: mm: Remove pagemap.h from mempolicy.h Nothing in mempolicy.h depends on pagemap.h. This only reduces the number of files that depend on pagemap.h by 5 (9118 to 9113), but it reduces our header entanglement slighty. Signed-off-by: Matthew Wilcox (Oracle) --- fs/aio.c | 1 + include/linux/mempolicy.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/fs/aio.c b/fs/aio.c index d78acc69f487..93657af6ca82 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 65c732d440d2..ba262af53863 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h @@ -13,7 +13,6 @@ #include #include #include -#include #include struct mm_struct; -- cgit v1.2.3 From 043341e3b5e7fcd3637867c3fd16053c676be2f8 Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Mon, 10 Aug 2026 16:21:25 -0400 Subject: balloon: Remove pagmap.h include Balloon does not logically depend on pagemap. Everyone getting pagemap.h throuogh balloon.h is already including pagemap.h because this eliminates no dependencies, but it's a nice cleanup. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/balloon.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/balloon.h b/include/linux/balloon.h index ca5b15150f42..13a0af318cc2 100644 --- a/include/linux/balloon.h +++ b/include/linux/balloon.h @@ -36,7 +36,6 @@ */ #ifndef _LINUX_BALLOON_H #define _LINUX_BALLOON_H -#include #include #include #include -- cgit v1.2.3 From 2854902575ac6d6cfa97e1bf0f134b718d65b16b Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Wed, 12 Aug 2026 11:01:28 -0400 Subject: drm: Remove pagemap from ttm_tt.h header This header does not depend on pagemap itself, nor does any file rely on pagemap being included through it. Signed-off-by: Matthew Wilcox (Oracle) --- include/drm/ttm/ttm_tt.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h index 406437ad674b..58c8bf9a6cbd 100644 --- a/include/drm/ttm/ttm_tt.h +++ b/include/drm/ttm/ttm_tt.h @@ -27,7 +27,6 @@ #ifndef _TTM_TT_H_ #define _TTM_TT_H_ -#include #include #include #include -- cgit v1.2.3 From 9a2d69cd7b99b042ae56c386ec2890aeab21b3c0 Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Wed, 12 Aug 2026 16:27:59 -0400 Subject: headers: Remove pagemap.h from swap.h swap.h does not need pagemap.h itself, and only three files were relying on pagemap.h being implicitly included by swap.h. This does not significantly reduce the number of files depending on pagemap.h, but it does reduce the entanglement of our headers a little. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 1 + drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 + fs/file_table.c | 1 + fs/inode.c | 1 + include/linux/swap.h | 1 - 5 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c index 043095f93ac6..297fca511afb 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c @@ -35,6 +35,7 @@ #include #include +#include #include #include diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c index 9442ec6e1f6c..c6c0866eebf4 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dmem.c +++ b/drivers/gpu/drm/nouveau/nouveau_dmem.c @@ -40,6 +40,7 @@ #include #include #include +#include /* * FIXME: this is ugly right now we are using TTM to allocate vram and we pin diff --git a/fs/file_table.c b/fs/file_table.c index c68b8c0a4097..8dcd213c0251 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/inode.c b/fs/inode.c index ba7da39be4a3..8d1cdaf64869 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/swap.h b/include/linux/swap.h index 696ed01709c2..e26b1cdccc50 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From aedeab60c2cc3f7c3997dcd4d98f3ee95bc7b345 Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Thu, 13 Aug 2026 16:53:14 -0400 Subject: net: Remove includes of pagemap.h Two ceph files call __page_cache_alloc(), so need to include pagemap.h. I'm not sure that they should be allocating memory using this interface, but that's a question for later. net/ is largely free of indirect dependencies on pagemap.h at this point. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/ceph/libceph.h | 1 - net/ceph/osd_client.c | 1 - net/ceph/pagevec.c | 1 + net/core/datagram.c | 1 - net/rds/rdma.c | 1 - 5 files changed, 1 insertion(+), 4 deletions(-) (limited to 'include') diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 63e0e2aa1ce9..4de957db6500 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 28d76c2f6b3e..86b681a56e20 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #ifdef CONFIG_BLOCK diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c index 858359873c4d..7e54c0c92b4f 100644 --- a/net/ceph/pagevec.c +++ b/net/ceph/pagevec.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/net/core/datagram.c b/net/core/datagram.c index 173b5d97bd40..b9b50ce8ea7c 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include diff --git a/net/rds/rdma.c b/net/rds/rdma.c index 078090d292fa..81cfbb2b2e87 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c @@ -30,7 +30,6 @@ * SOFTWARE. * */ -#include #include #include #include /* for DMA_*_DEVICE */ -- cgit v1.2.3 From 5d5e31b22113083f63f829896512ebe580e39bdf Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Thu, 13 Aug 2026 23:01:18 -0400 Subject: nfs: Remove pagemap.h from includes These two header files don't use anything from pagemap.h. Some files were depending on it being included, so add it directly to those files. Signed-off-by: Matthew Wilcox (Oracle) --- fs/nfs/blocklayout/blocklayout.c | 1 + fs/nfs/nfs42proc.c | 1 + fs/nfs/nfstrace.h | 1 + fs/nfs/pnfs.c | 1 + fs/nfsd/nfs4proc.c | 1 + include/linux/nfs_fs.h | 1 - include/linux/nfs_page.h | 1 - 7 files changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index d54a141a89b3..ddf56ec1ae3c 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c @@ -34,6 +34,7 @@ #include #include #include +#include #include /* struct bio */ #include diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index ab86246fc364..75048e9702a8 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -3,6 +3,7 @@ * Copyright (c) 2014 Anna Schumaker */ #include +#include #include #include #include diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h index 4ada21f4eebd..d0b02af15c15 100644 --- a/fs/nfs/nfstrace.h +++ b/fs/nfs/nfstrace.h @@ -9,6 +9,7 @@ #define _TRACE_NFS_H #include +#include #include #include diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 7715e2bd5871..ec7976409101 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "internal.h" #include "pnfs.h" diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 50c07561e31f..2e2e6ef479c5 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index ec17e602c979..8782d66a31b5 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 4b9a35dbc062..e11f65342074 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -12,7 +12,6 @@ #include -#include #include #include #include -- cgit v1.2.3 From e02cb91d4644dfff593146f89e70d2008cc6ac16 Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Thu, 13 Aug 2026 23:07:14 -0400 Subject: ksm: Remove pagemap.h include ksm.h doesn't need pagemap.h itself, nor do any files rely on it being implicitly included through this path. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/ksm.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/ksm.h b/include/linux/ksm.h index d39d0d5483a2..edfa67017560 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h @@ -10,7 +10,6 @@ #include #include -#include #include #include -- cgit v1.2.3