Subject: + mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy.patch added to -mm tree To: wujianguo@xxxxxxxxxx,guohanjun@xxxxxxxxxx,hughd@xxxxxxxxxx,kosaki.motohiro@xxxxxxxxxxxxxx,mgorman@xxxxxxx,riel@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Tue, 06 Aug 2013 14:04:19 -0700 The patch titled Subject: mm/mempolicy: return NULL if node is NUMA_NO_NODE in get_task_policy has been added to the -mm tree. Its filename is mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jianguo Wu <wujianguo@xxxxxxxxxx> 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. [akpm@xxxxxxxxxxxxxxxxxxxx: reorganise code] Signed-off-by: Jianguo Wu <wujianguo@xxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxx> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Hanjun Guo <guohanjun@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mempolicy.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff -puN mm/mempolicy.c~mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy mm/mempolicy.c --- a/mm/mempolicy.c~mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy +++ a/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 wujianguo@xxxxxxxxxx are mm-mempolicy-return-null-if-node-is-numa_no_node-in-get_task_policy.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html