]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2...
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 16 Dec 2011 04:49:22 +0000 (15:49 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 19 Dec 2011 07:19:11 +0000 (18:19 +1100)
Cc: David Rientjes <rientjes@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Miao Xie <miaox@cn.fujitsu.com>
Cc: Paul Menage <paul@paulmenage.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mempolicy.h
mm/mempolicy.c

index d2589e298215864aa7d37d5ccbb6461f6542abfb..7978eec1b7d9964420c2e854afba51a8f9cbf8f5 100644 (file)
@@ -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__ */
 
index adc395481813532efe82dced222e79115b075b0e..2ba25d5b23e51b5b64f8dd5c380d86b70a8d8d39 100644 (file)
@@ -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)
 {