memcg: use css_tryget in memcg
authorKAMEZAWA Hiroyuki <[email protected]>
Thu, 8 Jan 2009 02:08:33 +0000 (18:08 -0800)
committerLinus Torvalds <[email protected]>
Thu, 8 Jan 2009 16:31:10 +0000 (08:31 -0800)
commit54595fe2652f04dc8f5b985312c7cef5aa7bf722
tree4e63df850afb307a170c045217b2097aae271b78
parenta7ba0eef3af51cd1b6fc4028e4705b3ea2ea9469
memcg: use css_tryget in memcg

From:KAMEZAWA Hiroyuki <[email protected]>

css_tryget() newly is added and we can know css is alive or not and get
refcnt of css in very safe way.  ("alive" here means "rmdir/destroy" is
not called.)

This patch replaces css_get() to css_tryget(), where I cannot explain
why css_get() is safe. And removes memcg->obsolete flag.

Reviewed-by: Daisuke Nishimura <[email protected]>
Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Paul Menage <[email protected]>
Cc: Daisuke Nishimura <[email protected]>
Cc: Li Zefan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c