From 9bfdde5b83fe414456333dd61dba95574213205d Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 16 Dec 2011 15:49:22 +1100 Subject: [PATCH] cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix-2 Cc: David Rientjes Cc: KOSAKI Motohiro Cc: Miao Xie Cc: Paul Menage Cc: Stephen Rothwell Signed-off-by: Andrew Morton --- include/linux/mempolicy.h | 10 ---------- mm/mempolicy.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index d2589e298215..7978eec1b7d9 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h @@ -253,11 +253,6 @@ static inline int vma_migratable(struct vm_area_struct *vma) return 1; } -static inline bool task_has_mempolicy(struct task_struct *task) -{ - return task->mempolicy; -} - #else struct mempolicy {}; @@ -384,11 +379,6 @@ static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, return 0; } -static inline bool task_has_mempolicy(struct task_struct *task) -{ - return false; -} - #endif /* CONFIG_NUMA */ #endif /* __KERNEL__ */ diff --git a/mm/mempolicy.c b/mm/mempolicy.c index adc395481813..2ba25d5b23e5 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -137,6 +137,18 @@ static const struct mempolicy_operations { enum mpol_rebind_step step); } mpol_ops[MPOL_MAX]; +#ifdef CONFIG_NUMA +static inline bool task_has_mempolicy(struct task_struct *task) +{ + return task->mempolicy; +} +#else +static inline bool task_has_mempolicy(struct task_struct *task) +{ + return false; +} +#endif + /* Check that the nodemask contains at least one populated zone */ static int is_valid_nodemask(const nodemask_t *nodemask) { -- 2.39.5