lkml.org 
[lkml]   [2015]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2015-11-18 00:21    [W:0.115 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site