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

From: Li Zefan
Date: Wed Feb 29 2012 - 20:35:36 EST


Johannes Weiner 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: Li Zefan <lizf@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/