Skip to contentSkip to conversation

mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy.patch removed from -mm tree

merged [email protected] 1 participant 1 message Sep 12, 2013

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [merged] mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 12 Sep 2013 12:43:21 -0700

The patch titled
Subject: mm/mempolicy: return NULL if node is NUMA_NO_NODE in get_task_policy
has been removed from the -mm tree. Its filename was
mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Jianguo Wu <[email protected]>
Subject: mm/mempolicy: return NULL if node is NUMA_NO_NODE in get_task_policy

If node == NUMA_NO_NODE, pol is NULL, we should return NULL instead of do "if (!pol->mode)" check.

[[email protected]: reorganise code]
Cc Mel Gorman <[email protected]>
Cc KOSAKI Motohiro <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Hanjun Guo <[email protected]>

---

 mm/mempolicy.c |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
mm/mempolicy.c renamed from mm/mempolicy.c~mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy +10 -7
diff -puN mm/mempolicy.c~mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy mm/mempolicy.c
@@ -123,16 +123,19 @@ static struct mempolicy preferred_node_p
 static struct mempolicy *get_task_policy(struct task_struct *p)
 {
 	struct mempolicy *pol = p->mempolicy;
-	int node;
 
 	if (!pol) {
-		node = numa_node_id();
-		if (node != NUMA_NO_NODE)
-			pol = &preferred_node_policy[node];
+		int node = numa_node_id();
 
-		/* preferred_node_policy is not initialised early in boot */
-		if (!pol->mode)
-			pol = NULL;
+		if (node != NUMA_NO_NODE) {
+			pol = &preferred_node_policy[node];
+			/*
+			 * preferred_node_policy is not initialised early in
+			 * boot
+			 */
+			if (!pol->mode)
+				pol = NULL;
+		}
 	}
 
 	return pol;

_

Patches currently in -mm which might be from [email protected] are

origin.patch