提交 aaad153e 编写于 作者: W Wanpeng Li 提交者: Linus Torvalds

mm/memcg: mem_cgroup_relize_xxx_limit can guarantee memcg->res.limit <= memcg->memsw.limit

Signed-off-by: NWanpeng Li <liwp.linux@gmail.com>
Acked-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 05a73ed2
...@@ -3416,7 +3416,7 @@ static int mem_cgroup_resize_limit(struct mem_cgroup *memcg, ...@@ -3416,7 +3416,7 @@ static int mem_cgroup_resize_limit(struct mem_cgroup *memcg,
/* /*
* Rather than hide all in some function, I do this in * Rather than hide all in some function, I do this in
* open coded manner. You see what this really does. * open coded manner. You see what this really does.
* We have to guarantee memcg->res.limit < memcg->memsw.limit. * We have to guarantee memcg->res.limit <= memcg->memsw.limit.
*/ */
mutex_lock(&set_limit_mutex); mutex_lock(&set_limit_mutex);
memswlimit = res_counter_read_u64(&memcg->memsw, RES_LIMIT); memswlimit = res_counter_read_u64(&memcg->memsw, RES_LIMIT);
...@@ -3477,7 +3477,7 @@ static int mem_cgroup_resize_memsw_limit(struct mem_cgroup *memcg, ...@@ -3477,7 +3477,7 @@ static int mem_cgroup_resize_memsw_limit(struct mem_cgroup *memcg,
/* /*
* Rather than hide all in some function, I do this in * Rather than hide all in some function, I do this in
* open coded manner. You see what this really does. * open coded manner. You see what this really does.
* We have to guarantee memcg->res.limit < memcg->memsw.limit. * We have to guarantee memcg->res.limit <= memcg->memsw.limit.
*/ */
mutex_lock(&set_limit_mutex); mutex_lock(&set_limit_mutex);
memlimit = res_counter_read_u64(&memcg->res, RES_LIMIT); memlimit = res_counter_read_u64(&memcg->res, RES_LIMIT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册