[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250901061223.2939097-6-max.kellermann@ionos.com>
Date: Mon, 1 Sep 2025 08:12:16 +0200
From: Max Kellermann <max.kellermann@...os.com>
To: akpm@...ux-foundation.org,
david@...hat.com,
axelrasmussen@...gle.com,
yuanchu@...gle.com,
willy@...radead.org,
hughd@...gle.com,
mhocko@...e.com,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
lorenzo.stoakes@...cle.com,
Liam.Howlett@...cle.com,
vbabka@...e.cz,
rppt@...nel.org,
surenb@...gle.com,
vishal.moola@...il.com
Cc: Max Kellermann <max.kellermann@...os.com>
Subject: [PATCH v3 05/12] mm/oom_kill: add `const` to pointer parameter
For improved const-correctness.
Signed-off-by: Max Kellermann <max.kellermann@...os.com>
---
include/linux/mm.h | 2 +-
mm/oom_kill.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 18deb14cb1f5..f70c6b4d5f80 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -3840,7 +3840,7 @@ static inline int in_gate_area(struct mm_struct *mm, unsigned long addr)
}
#endif /* __HAVE_ARCH_GATE_AREA */
-extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm);
+bool process_shares_mm(const struct task_struct *p, const struct mm_struct *mm);
void drop_slab(void);
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 17650f0b516e..2620b32a8eba 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -490,7 +490,8 @@ static bool oom_killer_disabled __read_mostly;
* task's threads: if one of those is using this mm then this task was also
* using it.
*/
-bool process_shares_mm(struct task_struct *p, struct mm_struct *mm)
+bool process_shares_mm(const struct task_struct *const p,
+ const struct mm_struct *const mm)
{
struct task_struct *t;
--
2.47.2
Powered by blists - more mailing lists