summaryrefslogtreecommitdiff
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2014-04-07 15:37:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 16:35:57 -0700
commitd715ae08f2ff87508a081c4df78061bf4f7211d6 (patch)
treed81db4fd7c18cd7c549ab638ebeff1d07437d9a5 /mm/memcontrol.c
parent6d1fdc48938cd51a3964778d78f27cb26c8eb55d (diff)
memcg: rename high level charging functions
mem_cgroup_newpage_charge is used only for charging anonymous memory so it is better to rename it to mem_cgroup_charge_anon. mem_cgroup_cache_charge is used for file backed memory so rename it to mem_cgroup_charge_file. Signed-off-by: Michal Hocko <mhocko@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 038b037f8d67..e33b1d09eb1f 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3818,7 +3818,7 @@ out:
return ret;
}
-int mem_cgroup_newpage_charge(struct page *page,
+int mem_cgroup_charge_anon(struct page *page,
struct mm_struct *mm, gfp_t gfp_mask)
{
unsigned int nr_pages = 1;
@@ -3954,7 +3954,7 @@ void mem_cgroup_commit_charge_swapin(struct page *page,
MEM_CGROUP_CHARGE_TYPE_ANON);
}
-int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
+int mem_cgroup_charge_file(struct page *page, struct mm_struct *mm,
gfp_t gfp_mask)
{
enum charge_type type = MEM_CGROUP_CHARGE_TYPE_CACHE;