diff options
author | Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> | 2009-01-29 14:25:11 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-29 18:04:43 -0800 |
commit | 7bcc1bb1232de6efc0b85e0c7fe38e90b2436318 (patch) | |
tree | 3952a706885f4c57217f4196f055a7c16d0af80b /net/ipv4/tcp_cong.c | |
parent | baef99a08a2e23d9386b47e53fa5f0d44fc98f66 (diff) | |
download | op-kernel-dev-7bcc1bb1232de6efc0b85e0c7fe38e90b2436318.zip op-kernel-dev-7bcc1bb1232de6efc0b85e0c7fe38e90b2436318.tar.gz |
memcg: get/put parents at create/free
The lifetime of struct cgroup and struct mem_cgroup is different and
mem_cgroup has its own reference count for handling references from
swap_cgroup.
This causes strange problem that the parent mem_cgroup dies while child
mem_cgroup alive, and this problem causes a bug in case of
use_hierarchy==1 because res_counter_uncharge climbs up the tree.
This patch is for avoiding it by getting the parent at create, and putting
it at freeing.
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Reviewed-by; KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/ipv4/tcp_cong.c')
0 files changed, 0 insertions, 0 deletions