From: Anton Blanchard <anton@samba.org>
The recent NUMA changes fail to compile with large cpumasks, we need to use
a temporary to get around the type checking.
int best_node = -1;
for (i = 0; i < numnodes; i++) {
+ cpumask_t tmp;
+
/* Start from local node */
n = (node+i)%numnodes;
val = node_distance(node, n);
/* Give preference to headless and unused nodes */
- if (!cpus_empty(node_to_cpumask(n)))
+ tmp = node_to_cpumask(n);
+ if (!cpus_empty(tmp))
val += PENALTY_FOR_NODE_WITH_CPUS;
/* Slight preference for less loaded node */