[PATCH 1/2] memcg: remove unused page_memcg_check()
From: Sang-Heon Jeon
Date: Fri Sep 18 2026 - 12:58:17 EST
Since commit 90f095b816e2 ("mm/page_owner: use memcg_data snapshot to
avoid TOCTOU in print_page_owner_memcg()"), page_memcg_check() has no
callers.
So remove it.
No functional change.
Signed-off-by: Sang-Heon Jeon <ekffu200098@xxxxxxxxx>
---
include/linux/memcontrol.h | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 64c183be8cbf..b57a74617b0b 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -498,13 +498,6 @@ static inline struct mem_cgroup *folio_memcg_check(const struct folio *folio)
return obj_cgroup_memcg(objcg);
}
-static inline struct mem_cgroup *page_memcg_check(const struct page *page)
-{
- if (PageTail(page))
- return NULL;
- return folio_memcg_check((const struct folio *)page);
-}
-
static inline struct mem_cgroup *get_mem_cgroup_from_objcg(const struct obj_cgroup *objcg)
{
struct mem_cgroup *memcg;
@@ -1100,11 +1093,6 @@ static inline struct mem_cgroup *folio_memcg_check(const struct folio *folio)
return NULL;
}
-static inline struct mem_cgroup *page_memcg_check(const struct page *page)
-{
- return NULL;
-}
-
static inline struct mem_cgroup *get_mem_cgroup_from_objcg(const struct obj_cgroup *objcg)
{
return NULL;
--
2.43.0