From 92d0510c3585970fb26af27f7fd3ba58321523ac Mon Sep 17 00:00:00 2001 From: Roman Gushchin Date: Wed, 1 Apr 2020 21:06:49 -0700 Subject: mm: kmem: switch to nr_pages in (__)memcg_kmem_charge_memcg() These functions are charging the given number of kernel pages to the given memory cgroup. The number doesn't have to be a power of two. Let's make them to take the unsigned int nr_pages as an argument instead of the page order. It makes them look consistent with the corresponding uncharge functions and functions like: mem_cgroup_charge_skmem(memcg, nr_pages). Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Link: http://lkml.kernel.org/r/20200109202659.752357-5-guro@fb.com Signed-off-by: Linus Torvalds --- mm/slab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mm/slab.h') diff --git a/mm/slab.h b/mm/slab.h index e7da63fb8211..d96c87a30a9b 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(memcg, gfp, order); + ret = memcg_kmem_charge_memcg(memcg, gfp, 1 << order); if (ret) goto out; -- cgit v1.2.3