Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932595AbbKQXDn (ORCPT ); Tue, 17 Nov 2015 18:03:43 -0500 Received: from mail-yk0-f169.google.com ([209.85.160.169]:33460 "EHLO mail-yk0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752735AbbKQXDj (ORCPT ); Tue, 17 Nov 2015 18:03:39 -0500 Date: Tue, 17 Nov 2015 18:03:35 -0500 From: Tejun Heo To: Jan Engelhardt Cc: davem@davemloft.net, pablo@netfilter.org, kaber@trash.net, kadlec@blackhole.kfki.hu, lizefan@huawei.com, hannes@cmpxchg.org, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, daniel@iogearbox.net, daniel.wagner@bmw-carit.de, nhorman@tuxdriver.com Subject: Re: [PATCH 1/5] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it Message-ID: <20151117230335.GK22864@mtj.duckdns.org> References: <1447789240-29394-1-git-send-email-tj@kernel.org> <1447789240-29394-2-git-send-email-tj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 926 Lines: 24 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/