All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-add-some-missing-includes-to-mm-local-headers.patch removed from -mm tree
@ 2026-08-25  1:53 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-08-25  1:53 UTC (permalink / raw)
  To: mm-commits, ziy, vbabka, urezki, surenb, shikemeng, shakeel.butt,
	rppt, roman.gushchin, osalvador, nphamcs, muchun.song, mhocko,
	liam, kasong, hannes, david, chrisl, baoquan.he, baohua, ljs,
	akpm


The quilt patch titled
     Subject: mm: add some missing includes to mm-local headers
has been removed from the -mm tree.  Its filename was
     mm-add-some-missing-includes-to-mm-local-headers.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Subject: mm: add some missing includes to mm-local headers
Date: Tue, 04 Aug 2026 11:08:59 +0100

There are a number of internal headers local to mm/ which reference
functions and data types without including the relevant headers.

mm/vma.h is a special case that intentionally does not include additional
headers, but the others are not.

This breaks tooling like clangd (which is where I noticed this), though
the build is OK due to the C files including the headers happening to
include required dependencies.

It's better to be explicit about dependencies anyway, so add the missing
includes and fix clangd as a bonus.

Link: https://lore.kernel.org/20260804-fix-some-local-headers-v1-1-a7beb173c116@kernel.org
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Acked-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Barry Song <baohua@kernel.org>
Reviewed-by: Baoquan He <baoquan.he@linux.dev>
Cc: Chris Li <chrisl@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kairui Song <kasong@tencent.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/cma.h           |    1 +
 mm/hugetlb_cma.h   |    2 ++
 mm/memcontrol-v1.h |    1 +
 mm/pgalloc-track.h |    3 +++
 mm/shuffle.h       |    2 ++
 mm/swap.h          |    1 +
 mm/vmalloc.h       |    2 ++
 7 files changed, 12 insertions(+)

--- a/mm/cma.h~mm-add-some-missing-includes-to-mm-local-headers
+++ a/mm/cma.h
@@ -2,6 +2,7 @@
 #ifndef __MM_CMA_H__
 #define __MM_CMA_H__
 
+#include <linux/cma.h>
 #include <linux/debugfs.h>
 #include <linux/kobject.h>
 
--- a/mm/hugetlb_cma.h~mm-add-some-missing-includes-to-mm-local-headers
+++ a/mm/hugetlb_cma.h
@@ -2,6 +2,8 @@
 #ifndef _LINUX_HUGETLB_CMA_H
 #define _LINUX_HUGETLB_CMA_H
 
+#include <linux/hugetlb.h>
+
 #ifdef CONFIG_CMA
 void hugetlb_cma_free_frozen_folio(struct folio *folio);
 struct folio *hugetlb_cma_alloc_frozen_folio(int order, gfp_t gfp_mask,
--- a/mm/memcontrol-v1.h~mm-add-some-missing-includes-to-mm-local-headers
+++ a/mm/memcontrol-v1.h
@@ -4,6 +4,7 @@
 #define __MM_MEMCONTROL_V1_H
 
 #include <linux/cgroup-defs.h>
+#include <linux/memcontrol.h>
 
 /* Cgroup v1 and v2 common declarations */
 
--- a/mm/pgalloc-track.h~mm-add-some-missing-includes-to-mm-local-headers
+++ a/mm/pgalloc-track.h
@@ -2,6 +2,9 @@
 #ifndef _LINUX_PGALLOC_TRACK_H
 #define _LINUX_PGALLOC_TRACK_H
 
+#include <linux/mm.h>
+#include <linux/pgtable.h>
+
 #if defined(CONFIG_MMU)
 static inline p4d_t *p4d_alloc_track(struct mm_struct *mm, pgd_t *pgd,
 				     unsigned long address,
--- a/mm/shuffle.h~mm-add-some-missing-includes-to-mm-local-headers
+++ a/mm/shuffle.h
@@ -2,7 +2,9 @@
 // Copyright(c) 2018 Intel Corporation. All rights reserved.
 #ifndef _MM_SHUFFLE_H
 #define _MM_SHUFFLE_H
+
 #include <linux/jump_label.h>
+#include <linux/mmzone.h>
 
 #define SHUFFLE_ORDER MAX_PAGE_ORDER
 
--- a/mm/swap.h~mm-add-some-missing-includes-to-mm-local-headers
+++ a/mm/swap.h
@@ -5,6 +5,7 @@
 #include <linux/atomic.h> /* for atomic_long_t */
 #include <linux/mm.h> /* for PAGE_SHIFT */
 #include <linux/memcontrol.h> /* for mem_cgroup_swappiness() */
+#include <linux/swap.h> /* for MAX_SWAPFILES_SHIFT, struct swap_info_struct */
 
 struct mempolicy;
 struct swap_iocb;
--- a/mm/vmalloc.h~mm-add-some-missing-includes-to-mm-local-headers
+++ a/mm/vmalloc.h
@@ -5,6 +5,8 @@
 #ifndef __MM_VMALLOC_H
 #define __MM_VMALLOC_H
 
+#include <linux/vmalloc.h>
+
 #ifdef CONFIG_MMU
 void __init vmalloc_init(void);
 int __must_check vmap_pages_range_noflush(unsigned long addr, unsigned long end,
_

Patches currently in -mm which might be from ljs@kernel.org are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-25  1:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25  1:53 [merged mm-stable] mm-add-some-missing-includes-to-mm-local-headers.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.