From a7a2d0de7be31ffbf702ac4a5b75791b7b9fc525 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-fix Cc: David Rientjes Cc: KOSAKI Motohiro Cc: Miao Xie Cc: Paul Menage Cc: Stephen Rothwell Signed-off-by: Andrew Morton --- kernel/cpuset.c | 13 +++++++++++++ mm/mempolicy.c | 12 ------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 841a440b4d37..a09ac2b9a661 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -123,6 +123,19 @@ static inline struct cpuset *task_cs(struct task_struct *task) struct cpuset, css); } +#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 + + /* bits in struct cpuset flags field */ typedef enum { CS_CPU_EXCLUSIVE, diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 2ba25d5b23e5..adc395481813 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -137,18 +137,6 @@ 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