mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 07:10:27 +00:00
mm: kmem: cleanup memcg_kmem_uncharge_memcg() arguments
Drop the unused page argument and put the memcg pointer at the first place. This make the function consistent with its peers: __memcg_kmem_uncharge_memcg(), memcg_kmem_charge_memcg(), etc. Signed-off-by: Roman Gushchin <guro@fb.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Shakeel Butt <shakeelb@google.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Vladimir Davydov <vdavydov.dev@gmail.com> Link: http://lkml.kernel.org/r/20200109202659.752357-3-guro@fb.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
10eaec2f63
commit
50591183fa
@ -1414,8 +1414,8 @@ static inline int memcg_kmem_charge_memcg(struct mem_cgroup *memcg, gfp_t gfp,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void memcg_kmem_uncharge_memcg(struct page *page, int order,
|
static inline void memcg_kmem_uncharge_memcg(struct mem_cgroup *memcg,
|
||||||
struct mem_cgroup *memcg)
|
int order)
|
||||||
{
|
{
|
||||||
if (memcg_kmem_enabled())
|
if (memcg_kmem_enabled())
|
||||||
__memcg_kmem_uncharge_memcg(memcg, 1 << order);
|
__memcg_kmem_uncharge_memcg(memcg, 1 << order);
|
||||||
|
@ -395,7 +395,7 @@ static __always_inline void memcg_uncharge_slab(struct page *page, int order,
|
|||||||
if (likely(!mem_cgroup_is_root(memcg))) {
|
if (likely(!mem_cgroup_is_root(memcg))) {
|
||||||
lruvec = mem_cgroup_lruvec(memcg, page_pgdat(page));
|
lruvec = mem_cgroup_lruvec(memcg, page_pgdat(page));
|
||||||
mod_lruvec_state(lruvec, cache_vmstat_idx(s), -(1 << order));
|
mod_lruvec_state(lruvec, cache_vmstat_idx(s), -(1 << order));
|
||||||
memcg_kmem_uncharge_memcg(page, order, memcg);
|
memcg_kmem_uncharge_memcg(memcg, order);
|
||||||
} else {
|
} else {
|
||||||
mod_node_page_state(page_pgdat(page), cache_vmstat_idx(s),
|
mod_node_page_state(page_pgdat(page), cache_vmstat_idx(s),
|
||||||
-(1 << order));
|
-(1 << order));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user