mm: have zonelist contains structs with both a zone pointer and zone_idx
[sfrench/cifs-2.6.git] / kernel / cpuset.c
index 8b35fbd8292f2d5b53b613eab630c67af87ec6f8..a220b13cbfaf393bdecdfb933ef1eb73c2081618 100644 (file)
@@ -1967,8 +1967,8 @@ int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl)
 {
        int i;
 
-       for (i = 0; zl->zones[i]; i++) {
-               int nid = zone_to_nid(zl->zones[i]);
+       for (i = 0; zl->_zonerefs[i].zone; i++) {
+               int nid = zonelist_node_idx(&zl->_zonerefs[i]);
 
                if (node_isset(nid, current->mems_allowed))
                        return 1;