summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuopeng Zhang <zhangguopeng@kylinos.cn>2026-07-13 17:37:37 +0800
committerAndrew Morton <akpm@linux-foundation.org>2026-08-06 18:56:55 -0700
commit08d36b191f337dac643ec3365cc5d2e56c9f2d64 (patch)
treed8641dfefc52c6a43e8193ffe16e1ee2093dfc04
parentafe9ae3fda96d1ccfd28f7b0c1f68527a570ccd4 (diff)
mm: memcg-v1: make mem_cgroup_oom_notify_cb() return void
Commit 7d74b06f240f ("memcg: use for_each_mem_cgroup") replaced the mem_cgroup_walk_tree() call in mem_cgroup_oom_notify() with for_each_mem_cgroup_tree(), but left mem_cgroup_oom_notify_cb() with the int return type required by the old callback interface. The function now has a single direct caller and no failure path. Make it return void. Link: https://lore.kernel.org/20260713093737.3299646-1-guopeng.zhang@linux.dev Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Muchun Song <muchun.song@linux.dev> Reviewed-by: SJ Park <sj@kernel.org> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> Cc: Roman Gushchin <roman.gushchin@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/memcontrol-v1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c
index e43b13208eca..2dc599484d00 100644
--- a/mm/memcontrol-v1.c
+++ b/mm/memcontrol-v1.c
@@ -752,7 +752,7 @@ static int compare_thresholds(const void *a, const void *b)
return 0;
}
-static int mem_cgroup_oom_notify_cb(struct mem_cgroup *memcg)
+static void mem_cgroup_oom_notify_cb(struct mem_cgroup *memcg)
{
struct mem_cgroup_eventfd_list *ev;
@@ -762,7 +762,6 @@ static int mem_cgroup_oom_notify_cb(struct mem_cgroup *memcg)
eventfd_signal(ev->eventfd);
spin_unlock(&memcg_oom_lock);
- return 0;
}
static void mem_cgroup_oom_notify(struct mem_cgroup *memcg)