Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761163Ab1EOWVn (ORCPT ); Sun, 15 May 2011 18:21:43 -0400 Received: from mout.perfora.net ([74.208.4.194]:57226 "EHLO mout.perfora.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761168Ab1EOWVi (ORCPT ); Sun, 15 May 2011 18:21:38 -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 Subject: [PATCH v2 1/9] mm: export get_vma_policy() Date: Sun, 15 May 2011 18:20:21 -0400 Message-Id: <1305498029-11677-2-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:GSTksvR9NfM0yltO2qliKREepMAFs2HJ3OVVyedSUDg Zs9ECgWauh+5jEKDZ/PBsqbySFBB4WdY80FIz3q7HAKFZCcVY+ blRzjkFN/UYHGM72QVsNgerDki++7VknMSl/1aRpOTdqc+qXS3 R2yN5ubiu6ubjAeSSUYTtBGDpJ+KSzTz+8rgxDJTYyKAy5/Ggx vjlURXa2JEpOvKs1QmIhSUXX2K0WhiNY+WyGdqGIrU= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2285 Lines: 55 In commit 48fce3429df84a94766fbbc845fa8450d0715b48 get_vma_policy() was marked static as all clients were local to mempolicy.c. However, the decision to generate /proc/pid/numa_maps in the numa memory policy code and outside the procfs subsystem introduces an artificial interdependency between the two systems. Exporting get_vma_policy() once again is the first step to clean up this interdependency. Signed-off-by: Stephen Wilson Reviewed-by: KOSAKI Motohiro Cc: Hugh Dickins Cc: David Rientjes Cc: Lee Schermerhorn Cc: Alexey Dobriyan Cc: Christoph Lameter --- include/linux/mempolicy.h | 3 +++ mm/mempolicy.c | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 31ac26c..c2f6032 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h @@ -199,6 +199,9 @@ void mpol_free_shared_policy(struct shared_policy *p); struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, unsigned long idx); +struct mempolicy *get_vma_policy(struct task_struct *tsk, + struct vm_area_struct *vma, unsigned long addr); + extern void numa_default_policy(void); extern void numa_policy_init(void); extern void mpol_rebind_task(struct task_struct *tsk, const nodemask_t *new, diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 8e57a72..6cc997d 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1490,7 +1490,7 @@ asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len, * freeing by another task. It is the caller's responsibility to free the * extra reference for shared policies. */ -static struct mempolicy *get_vma_policy(struct task_struct *task, +struct mempolicy *get_vma_policy(struct task_struct *task, struct vm_area_struct *vma, unsigned long addr) { struct mempolicy *pol = task->mempolicy; -- 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/