Johannes Weiner 91c63734f6 kernel: cgroup: push rcu read locking from css_is_ancestor() to callsite
Library functions should not grab locks when the callsites can do it,
even if the lock nests like the rcu read-side lock does.

Push the rcu_read_lock() from css_is_ancestor() to its single user,
mem_cgroup_same_or_subtree() in preparation for another user that may
already hold the rcu read-side lock.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-29 16:22:20 -07:00
..
2012-01-03 22:54:56 -05:00
2011-07-26 16:49:47 -07:00
2012-05-29 16:22:19 -07:00
2010-05-21 18:31:21 -04:00
2012-04-21 01:58:20 -04:00
2011-03-10 08:52:27 +01:00
2012-01-20 09:23:16 -08:00
2011-05-20 12:50:29 -07:00
2012-05-29 16:22:19 -07:00
2012-05-28 09:54:45 -07:00
2012-05-29 16:22:19 -07:00