Re: [PATCH 1/5] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it

From
Tejun Heo <tj@kernel.org>
Date
2015-11-17 23:03:43
Also in
cgroups, lkml, netfilter-devel
Reply to
Jan Engelhardt, 2015-11-17
On Tue, Nov 17, 2015 at 11:54:54PM +0100, Jan Engelhardt wrote:
On Tuesday 2015-11-17 20:40, Tejun Heo wrote:
quoted
+static inline bool cgroup_is_descendant(struct cgroup *cgrp,
+					struct cgroup *ancestor)
(const struct group *cgrp, const struct group *ancestor)
I'm not sure about using const on complex data structures.  It often
ends up causing more mess than being helpful.  It's never consistent
and often can't be - e.g. you throw in an iteration macro and then
realize that there need to be two separate variants of iteration
macros for consts and !consts after propagating const through the call
chains and then end up doing forced casts.

Thanks.

-- 
tejun
Thread (22 messages) 22 messages, 4 authors, last reply 2015-11-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help