[PATCH 4/8] memcg: convert to use cgroup_from_id()

Li Zefan
2013-04-08T08:22:00Z

This is a preparation to kill css_id.

Signed-off-by: Li Zefan <lizefan@huawei.com>
---
mm/memcontrol.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 14f1375..3561d0b 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2769,15 +2769,15 @@ static void __mem_cgroup_cancel_local_charge(struct mem_cgroup *memcg,
*/
static struct mem_cgroup *mem_cgroup_lookup(unsigned short id)
{
- struct cgroup_subsys_state *css;
+ struct cgroup *cgrp;

/* ID 0 is unused ID */
if (!id)
return NULL;
- css = css_lookup(&mem_cgroup_subsys, id);
- if (!css)
+ cgrp = cgroup_from_id(&mem_cgroup_subsys, id);
+ if (!cgrp)
return NULL;
- return mem_cgroup_from_css(css);
+ return mem_cgroup_from_cont(cgrp);
}

struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page)
--
1.8.0.2