Re: [patch 1/2] kernel: cgroup: push rcu read locking fromcss_is_ancestor() to callsite

From: KAMEZAWA Hiroyuki
Date: Tue Feb 28 2012 - 19:01:48 EST


On Tue, 28 Feb 2012 15:14:48 +0100
Johannes Weiner <hannes@xxxxxxxxxxx> wrote:

> 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@xxxxxxxxxxx>

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/