Messages in this thread | | | Date | Tue, 17 Nov 2015 18:03:35 -0500 | From | Tejun Heo <> | Subject | Re: [PATCH 1/5] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it |
| |
On Tue, Nov 17, 2015 at 11:54:54PM +0100, Jan Engelhardt wrote: > > On Tuesday 2015-11-17 20:40, Tejun Heo wrote: > >+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
| |