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-04-04 17:26:08 -07:00
2011-07-26 16:49:45 -07:00
2011-03-14 09:15:23 -04:00
2012-05-21 23:52:30 -04:00
2011-09-23 12:05:29 +05:30
2011-07-14 12:59:14 +03:00
2012-03-28 18:30:03 +01:00
2012-04-26 12:06:09 +02:00
2012-03-29 19:52:46 +08:00
2012-03-28 18:30:03 +01:00
2012-05-08 12:35:06 +02:00
2011-10-31 17:30:44 -07:00
2011-09-19 17:04:37 -07:00
2012-03-15 18:17:55 -07:00
2012-05-19 15:44:40 -06:00