Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755334Ab1EOWW2 (ORCPT ); Sun, 15 May 2011 18:22:28 -0400 Received: from mout.perfora.net ([74.208.4.194]:50092 "EHLO mout.perfora.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761443Ab1EOWWQ (ORCPT ); Sun, 15 May 2011 18:22:16 -0400 From: Stephen Wilson To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, KOSAKI Motohiro , Stephen Wilson , Hugh Dickins , David Rientjes , Lee Schermerhorn , Alexey Dobriyan , Christoph Lameter , Randy Dunlap Subject: [PATCH v2 6/9] mm: declare mpol_to_str() when CONFIG_TMPFS=n Date: Sun, 15 May 2011 18:20:26 -0400 Message-Id: <1305498029-11677-7-git-send-email-wilsons@start.ca> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1305498029-11677-1-git-send-email-wilsons@start.ca> References: <1305498029-11677-1-git-send-email-wilsons@start.ca> X-Provags-ID: V02:K0:QX/RSZCyynoZDrp5zdtk6glfoWRwBT7O8SNlnxJJzdz ZGEW+SBibZ5ZaeRh04UodAUXbrcG4LvVxCtVfO8o5NDkQPWXuq Tq6JNle1Hp7+X0TErMrhpsH3V4ZdgHIXB/in+K2xT2MWYFiA9T YSQunfWVJRfnhu2p1xprbcNyP+fre0szaGPTZyUon2yM1ngpC5 Y0QVkNRczSvjb0peAh0bhCN1qtrDwILt3/+qK5aqQA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1952 Lines: 59 When CONFIG_TMPFS=n mpol_to_str() is not declared in mempolicy.h. However, in the NUMA case, the definition is always compiled. Since it is not strictly true that tmpfs is the only client, and since the symbol was always lurking around anyways, export mpol_to_str() unconditionally. Furthermore, this will allow us to move show_numa_map() out of mempolicy.c and into the procfs subsystem. Signed-off-by: Stephen Wilson Cc: KOSAKI Motohiro Cc: Hugh Dickins Cc: David Rientjes Cc: Lee Schermerhorn Cc: Alexey Dobriyan Cc: Christoph Lameter Cc: Randy Dunlap --- include/linux/mempolicy.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index c2f6032..7978eec 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h @@ -231,10 +231,10 @@ int do_migrate_pages(struct mm_struct *mm, #ifdef CONFIG_TMPFS extern int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context); +#endif extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, int no_context); -#endif /* Check if a vma is migratable */ static inline int vma_migratable(struct vm_area_struct *vma) @@ -371,13 +371,13 @@ static inline int mpol_parse_str(char *str, struct mempolicy **mpol, { return 1; /* error */ } +#endif static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, int no_context) { return 0; } -#endif #endif /* CONFIG_NUMA */ #endif /* __KERNEL__ */ -- 1.7.4.4 -- 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/