From: William Lee Irwin III Without passing this parameter by reference, the changes to used_node_mask are meaningless and do not affect the caller's copy. This leads to boot-time failure. This proposed fix passes it by reference. Signed-off-by: William Irwin Signed-off-by: Andrew Morton --- 25-akpm/mm/page_alloc.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff -puN mm/page_alloc.c~replace-numnodes-with-node_online_map-fix mm/page_alloc.c --- 25/mm/page_alloc.c~replace-numnodes-with-node_online_map-fix Tue Jan 4 15:43:22 2005 +++ 25-akpm/mm/page_alloc.c Tue Jan 4 15:43:22 2005 @@ -1231,7 +1231,7 @@ static int __initdata node_load[MAX_NUMN * on them otherwise. * It returns -1 if no node is found. */ -static int __init find_next_best_node(int node, nodemask_t used_node_mask) +static int __init find_next_best_node(int node, nodemask_t *used_node_mask) { int i, n, val; int min_val = INT_MAX; @@ -1244,11 +1244,11 @@ static int __init find_next_best_node(in n = (node+i) % num_online_nodes(); /* Don't want a node to appear more than once */ - if (node_isset(n, used_node_mask)) + if (node_isset(n, *used_node_mask)) continue; /* Use the local node if we haven't already */ - if (!node_isset(node, used_node_mask)) { + if (!node_isset(node, *used_node_mask)) { best_node = node; break; } @@ -1272,7 +1272,7 @@ static int __init find_next_best_node(in } if (best_node >= 0) - node_set(best_node, used_node_mask); + node_set(best_node, *used_node_mask); return best_node; } @@ -1296,7 +1296,7 @@ static void __init build_zonelists(pg_da load = num_online_nodes(); prev_node = local_node; nodes_clear(used_mask); - while ((node = find_next_best_node(local_node, used_mask)) >= 0) { + while ((node = find_next_best_node(local_node, &used_mask)) >= 0) { /* * We don't want to pressure a particular node. * So adding penalty to the first node in same _