]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kernel: cgroup: push rcu read locking from css_is_ancestor() to callsite
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 3 May 2012 05:43:48 +0000 (15:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:29 +0000 (15:46 +1000)
commite509da08353e608761f50af478a4cfd9935aeb89
tree8bf586787dcc800ef2b4c6309e5ec03001bb8541
parent0c05fb567bd22616ff7c99141d76b87dbc5f1977
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>
kernel/cgroup.c
mm/memcontrol.c