From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx164.postini.com [74.125.245.164]) by kanga.kvack.org (Postfix) with SMTP id 6BDB66B005A for ; Sun, 22 Jul 2012 23:27:55 -0400 (EDT) Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 23 Jul 2012 08:57:51 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6N3RlOb21233798 for ; Mon, 23 Jul 2012 08:57:48 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6N8vKY6032722 for ; Mon, 23 Jul 2012 14:27:21 +0530 From: Wanpeng Li Subject: [PATCH] memcg: fix mm/memcontrol.c build error against linux-next Date: Mon, 23 Jul 2012 11:27:34 +0800 Message-Id: <1343014054-30929-1-git-send-email-liwanp@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Fengguang Wu , Seth Jennings , "Kirill A. Shutemov" , linux-mm@kvack.org, Michal Hocko , Johannes Weiner , KAMEZAWAHiroyuki , Gavin Shan , linux-kernel@vger.kernel.org, Wanpeng Li As Fengguang Wu reported, linux-next failed to build with tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm head: 37e2ad4953983527f7bdb6831bf478eedcc84082 commit: 442d53f161093de78f0aafcd3ec2a6345de42890 [164/309] memcg: add mem_cgroup_from_css() helper mem_cgroup_from_css() is defined inside CONFIG_MEMCG_KMEM and used outside of it, move mem_cgroup_from_css() out of the #ifdef CONFIG_MEMCG_KMEM can address this issue. Reported-by: Fengguang Wu Reported-by: Seth Jennings Signed-off-by: Wanpeng Li --- mm/memcontrol.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 439190b..994e353 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -405,17 +405,17 @@ enum charge_type { static void mem_cgroup_get(struct mem_cgroup *memcg); static void mem_cgroup_put(struct mem_cgroup *memcg); -/* Writing them here to avoid exposing memcg's inner layout */ -#ifdef CONFIG_MEMCG_KMEM -#include -#include - static inline struct mem_cgroup *mem_cgroup_from_css(struct cgroup_subsys_state *s) { return container_of(s, struct mem_cgroup, css); } +/* Writing them here to avoid exposing memcg's inner layout */ +#ifdef CONFIG_MEMCG_KMEM +#include +#include + static bool mem_cgroup_is_root(struct mem_cgroup *memcg); void sock_update_memcg(struct sock *sk) { -- 1.7.7.6 -- 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