mm-memcontrol-constify-the-swap-accounting-helpers.patch removed from -mm tree
The quilt patch titled
Subject: mm: memcontrol: constify the swap accounting helpers
has been removed from the -mm tree. Its filename was
mm-memcontrol-constify-the-swap-accounting-helpers.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: Tal Zussman <[email protected]>
Subject: mm: memcontrol: constify the swap accounting helpers
Date: Tue, 15 Sep 2026 19:20:13 -0400
mem_cgroup_get_nr_swap_pages(), mem_cgroup_get_folio_swap_margin(), and mem_cgroup_swap_full() only read swap counters and limits. Constify them.
Remove externs from function declarations while at it.
---
include/linux/swap.h | 12 ++++++------ mm/memcontrol.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-)
include/linux/swap.h renamed from include/linux/swap.h~mm-memcontrol-constify-the-swap-accounting-helpers +6 -6
@@ -527,9 +527,9 @@ static inline void mem_cgroup_uncharge_s __mem_cgroup_uncharge_swap(id, nr_pages); } -long mem_cgroup_get_folio_swap_margin (struct folio *folio); -extern long mem_cgroup_get_nr_swap_pages (struct mem_cgroup *memcg); -extern bool mem_cgroup_swap_full (struct folio *folio); +long mem_cgroup_get_folio_swap_margin (const struct folio *folio); +long mem_cgroup_get_nr_swap_pages (const struct mem_cgroup *memcg); +bool mem_cgroup_swap_full (const struct folio *folio);#else static inline int mem_cgroup_try_charge_swap (struct folio *folio) {
@@ -541,17 +541,17 @@ static inline void mem_cgroup_uncharge_s { } -static inline long mem_cgroup_get_folio_swap_margin (struct folio *folio) +static inline long mem_cgroup_get_folio_swap_margin (const struct folio *folio) {return PAGE_COUNTER_MAX ; } -static inline long mem_cgroup_get_nr_swap_pages (struct mem_cgroup *memcg) +static inline long mem_cgroup_get_nr_swap_pages (const struct mem_cgroup *memcg) {return get_nr_swap_pages (); } -static inline bool mem_cgroup_swap_full (struct folio *folio) +static inline bool mem_cgroup_swap_full (const struct folio *folio) {return vm_swap_full (); }
mm/memcontrol.c renamed from mm/memcontrol.c~mm-memcontrol-constify-the-swap-accounting-helpers +3 -3
@@ -6017,7 +6017,7 @@ void __mem_cgroup_uncharge_swap(unsignedrcu_read_unlock (); } -long mem_cgroup_get_nr_swap_pages (struct mem_cgroup *memcg) +long mem_cgroup_get_nr_swap_pages (const struct mem_cgroup *memcg) {long nr_swap_pages =get_nr_swap_pages ();
@@ -6033,7 +6033,7 @@ long mem_cgroup_get_nr_swap_pages(struct* * Return: Remaining chargeable pages in the folio's memcg hierarchy. */ -long mem_cgroup_get_folio_swap_margin (struct folio *folio) +long mem_cgroup_get_folio_swap_margin (const struct folio *folio) {struct mem_cgroup *memcg;long margin;
@@ -6050,7 +6050,7 @@ long mem_cgroup_get_folio_swap_margin(streturn margin; } -bool mem_cgroup_swap_full (struct folio *folio) +bool mem_cgroup_swap_full (const struct folio *folio) {struct mem_cgroup *memcg;bool ret = false;
_
Patches currently in -mm which might be from [email protected] are