mm-page_counter-constify-page_counter_read-and-page_counter_margin.patch removed from -mm tree
The quilt patch titled
Subject: mm: page_counter: constify page_counter_read() and page_counter_margin()
has been removed from the -mm tree. Its filename was
mm-page_counter-constify-page_counter_read-and-page_counter_margin.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: page_counter: constify page_counter_read() and page_counter_margin()
Date: Tue, 15 Sep 2026 19:20:10 -0400
Both only read the counter. Constify them so that users can read counters from const memcgs.
Signed-off-by Tal Zussman <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
Reviewed-by Muchun Song <[email protected]>
Acked-by Shakeel Butt <[email protected]>
Cc Axel Rasmussen <[email protected]>
Cc Baolin Wang <[email protected]>
Cc Baoquan He <[email protected]>
Cc Barry Song <[email protected]>
Cc Chris Li <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Kairui Song <[email protected]>
Cc Kemeng Shi <[email protected]>
Cc Liam R. Howlett <[email protected]>
Cc Matthew Wilcox (Oracle) <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Nhat Pham <[email protected]>
Cc Roman Gushchin <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Wei Xu <[email protected]>
Cc Yuanchu Xie <[email protected]>
---
include/linux/page_counter.h | 4 ++-- mm/page_counter.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
include/linux/page_counter.h renamed from include/linux/page_counter.h~mm-page_counter-constify-page_counter_read-and-page_counter_margin +2 -2
@@ -63,12 +63,12 @@ static inline void page_counter_init(str counter->track_failcnt = false; } -static inline unsigned long page_counter_read (struct page_counter *counter) +static inline unsigned long page_counter_read (const struct page_counter *counter) {return atomic_long_read (&counter->usage); } -long page_counter_margin (struct page_counter *counter); +long page_counter_margin (const struct page_counter *counter);void page_counter_cancel (struct page_counter *counter,unsigned long nr_pages);void page_counter_charge (struct page_counter *counter,unsigned long nr_pages); bool page_counter_try_charge(struct page_counter *counter,
mm/page_counter.c renamed from mm/page_counter.c~mm-page_counter-constify-page_counter_read-and-page_counter_margin +1 -1
@@ -54,7 +54,7 @@ static void propagate_protected_usage(st* Return: The minimum value of max minus usage across @counter and all of * its ancestors. The value may be negative during a concurrent charge. */ -long page_counter_margin (struct page_counter *counter) +long page_counter_margin (const struct page_counter *counter) {long margin =PAGE_COUNTER_MAX ;
_
Patches currently in -mm which might be from [email protected] are