From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx152.postini.com [74.125.245.152]) by kanga.kvack.org (Postfix) with SMTP id BA2646B0208 for ; Fri, 14 Sep 2012 08:01:41 -0400 (EDT) Date: Fri, 14 Sep 2012 14:01:39 +0200 From: Michal Hocko Subject: Re: [PATCH v2] memcg: clean up networking headers file inclusion Message-ID: <20120914120138.GK28039@dhcp22.suse.cz> References: <20120914112118.GG28039@dhcp22.suse.cz> <50531339.1000805@parallels.com> <20120914113400.GI28039@dhcp22.suse.cz> <50531696.1080708@parallels.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <50531696.1080708@parallels.com> Sender: owner-linux-mm@kvack.org List-ID: To: Glauber Costa Cc: Andrew Morton , linux-mm@kvack.org, Sachin Kamat On Fri 14-09-12 15:35:50, Glauber Costa wrote: > On 09/14/2012 03:34 PM, Michal Hocko wrote: > > On Fri 14-09-12 15:21:29, Glauber Costa wrote: > >> On 09/14/2012 03:21 PM, Michal Hocko wrote: > >>> Hi, > >>> so I did some more changes to ifdefery of sock kmem part. The patch is > >>> below. > >>> Glauber please have a look at it. I do not think any of the > >>> functionality wrapped inside CONFIG_MEMCG_KMEM without CONFIG_INET is > >>> reusable for generic CONFIG_MEMCG_KMEM, right? > >> Almost right. > >> > >> > >> > >>> } > >>> > >>> /* Writing them here to avoid exposing memcg's inner layout */ > >>> -#ifdef CONFIG_MEMCG_KMEM > >>> -#include > >>> -#include > >>> +#if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM) > >>> > >>> static bool mem_cgroup_is_root(struct mem_cgroup *memcg); > >> > >> This one is. ^^^^ > > > > But this is just a forward declaration. And btw. it makes my compiler > > complain about: > > mm/memcontrol.c:421: warning: a??mem_cgroup_is_roota?? declared inline after being called > > mm/memcontrol.c:421: warning: previous declaration of a??mem_cgroup_is_roota?? was here > > > > But I didn't care much yet. It is probaly that my compiler is too old to > > be clever about this. > > > Weird, this code is in tree for a long time. Yes I think it is just compiler issue. Anyway the trivial patch bellow does the trick. ---