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

From: Tejun Heo
Date: Tue Nov 17 2015 - 18:03:46 EST


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
--
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/