Skip to content

Commit

Permalink
mm/memcontrol.c: fix a -Wunused-function warning
Browse files Browse the repository at this point in the history
mem_cgroup_id_get() was introduced in commit 73f576c ("mm:memcontrol:
fix cgroup creation failure after many small jobs").

Later, it no longer has any user since the commits,

1f47b61 ("mm: memcontrol: fix swap counter leak on swapout from offline cgroup")
58fa2a5 ("mm: memcontrol: add sanity checks for memcg->id.ref on get/put")

so safe to remove it.

Link: http://lkml.kernel.org/r/1568648453-5482-1-git-send-email-cai@lca.pw
Signed-off-by: Qian Cai <cai@lca.pw>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Qian Cai authored and torvalds committed Sep 24, 2019
1 parent 1eb41bb commit 4d0e323
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -4930,11 +4930,6 @@ static void mem_cgroup_id_put_many(struct mem_cgroup *memcg, unsigned int n)
}
}

static inline void mem_cgroup_id_get(struct mem_cgroup *memcg)
{
mem_cgroup_id_get_many(memcg, 1);
}

static inline void mem_cgroup_id_put(struct mem_cgroup *memcg)
{
mem_cgroup_id_put_many(memcg, 1);
Expand Down

0 comments on commit 4d0e323

Please sign in to comment.