Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754712Ab2JJJ13 (ORCPT ); Wed, 10 Oct 2012 05:27:29 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55914 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754418Ab2JJJ10 (ORCPT ); Wed, 10 Oct 2012 05:27:26 -0400 Date: Wed, 10 Oct 2012 11:27:25 +0200 From: Michal Hocko To: David Rientjes Cc: Andrew Morton , Linus Torvalds , Randy Dunlap , KAMEZAWA Hiroyuki , "Kirill A. Shutemov" , "David S. Miller" , "Eric W. Biederman" , Eric Dumazet , Glauber Costa , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch for-linus] memcg, kmem: fix build error when CONFIG_INET is disabled Message-ID: <20121010092725.GA23288@dhcp22.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1960 Lines: 59 On Tue 09-10-12 23:32:35, David Rientjes wrote: > Commit e1aab161e013 ("socket: initial cgroup code.") causes a build error > when CONFIG_INET is disabled in Linus' tree: > > net/built-in.o: In function `sk_update_clone': > net/core/sock.c:1336: undefined reference to `sock_update_memcg' > > sock_update_memcg() is only defined when CONFIG_INET is enabled, so fix it > by defining the dummy function without this option. > > Reported-by: Randy Dunlap > Signed-off-by: David Rientjes Acked-by: Michal Hocko Thanks! > --- > Checking the logs, Randy reported this in an email to LKML on > September 24 and didn't get a response... > > include/linux/memcontrol.h | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h > --- a/include/linux/memcontrol.h > +++ b/include/linux/memcontrol.h > @@ -396,7 +396,7 @@ enum { > }; > > struct sock; > -#ifdef CONFIG_MEMCG_KMEM > +#if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM) > void sock_update_memcg(struct sock *sk); > void sock_release_memcg(struct sock *sk); > #else > @@ -406,6 +406,6 @@ static inline void sock_update_memcg(struct sock *sk) > static inline void sock_release_memcg(struct sock *sk) > { > } > -#endif /* CONFIG_MEMCG_KMEM */ > +#endif /* CONFIG_INET && CONFIG_MEMCG_KMEM */ > #endif /* _LINUX_MEMCONTROL_H */ > > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org -- Michal Hocko SUSE Labs -- 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/