diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 8 | ||||
-rw-r--r-- | mm/slab.h | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c1aa24a57e55..896b6ebef6a2 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2882,15 +2882,13 @@ void memcg_kmem_put_cache(struct kmem_cache *cachep) /** * __memcg_kmem_charge_memcg: charge a kmem page - * @page: page to charge + * @memcg: memory cgroup to charge * @gfp: reclaim mode * @order: allocation order - * @memcg: memory cgroup to charge * * Returns 0 on success, an error code on failure. */ -int __memcg_kmem_charge_memcg(struct page *page, gfp_t gfp, int order, - struct mem_cgroup *memcg) +int __memcg_kmem_charge_memcg(struct mem_cgroup *memcg, gfp_t gfp, int order) { unsigned int nr_pages = 1 << order; struct page_counter *counter; @@ -2936,7 +2934,7 @@ int __memcg_kmem_charge(struct page *page, gfp_t gfp, int order) memcg = get_mem_cgroup_from_current(); if (!mem_cgroup_is_root(memcg)) { - ret = __memcg_kmem_charge_memcg(page, gfp, order, memcg); + ret = __memcg_kmem_charge_memcg(memcg, gfp, order); if (!ret) { page->mem_cgroup = memcg; __SetPageKmemcg(page); diff --git a/mm/slab.h b/mm/slab.h index 7e94700aa78c..c4c93e991250 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -365,7 +365,7 @@ static __always_inline int memcg_charge_slab(struct page *page, return 0; } - ret = memcg_kmem_charge_memcg(page, gfp, order, memcg); + ret = memcg_kmem_charge_memcg(memcg, gfp, order); if (ret) goto out; |