diff options
| -rw-r--r-- | include/linux/mmzone.h | 13 | ||||
| -rw-r--r-- | mm/mmzone.c | 4 |
2 files changed, 8 insertions, 9 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index b41829701334..f279d9c158cd 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -970,7 +970,6 @@ static inline int zonelist_node_idx(struct zoneref *zoneref) | |||
| 970 | * @z - The cursor used as a starting point for the search | 970 | * @z - The cursor used as a starting point for the search |
| 971 | * @highest_zoneidx - The zone index of the highest zone to return | 971 | * @highest_zoneidx - The zone index of the highest zone to return |
| 972 | * @nodes - An optional nodemask to filter the zonelist with | 972 | * @nodes - An optional nodemask to filter the zonelist with |
| 973 | * @zone - The first suitable zone found is returned via this parameter | ||
| 974 | * | 973 | * |
| 975 | * This function returns the next zone at or below a given zone index that is | 974 | * This function returns the next zone at or below a given zone index that is |
| 976 | * within the allowed nodemask using a cursor as the starting point for the | 975 | * within the allowed nodemask using a cursor as the starting point for the |
| @@ -980,8 +979,7 @@ static inline int zonelist_node_idx(struct zoneref *zoneref) | |||
| 980 | */ | 979 | */ |
| 981 | struct zoneref *next_zones_zonelist(struct zoneref *z, | 980 | struct zoneref *next_zones_zonelist(struct zoneref *z, |
| 982 | enum zone_type highest_zoneidx, | 981 | enum zone_type highest_zoneidx, |
| 983 | nodemask_t *nodes, | 982 | nodemask_t *nodes); |
| 984 | struct zone **zone); | ||
| 985 | 983 | ||
| 986 | /** | 984 | /** |
| 987 | * first_zones_zonelist - Returns the first zone at or below highest_zoneidx within the allowed nodemask in a zonelist | 985 | * first_zones_zonelist - Returns the first zone at or below highest_zoneidx within the allowed nodemask in a zonelist |
| @@ -1000,8 +998,10 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, | |||
| 1000 | nodemask_t *nodes, | 998 | nodemask_t *nodes, |
| 1001 | struct zone **zone) | 999 | struct zone **zone) |
| 1002 | { | 1000 | { |
| 1003 | return next_zones_zonelist(zonelist->_zonerefs, highest_zoneidx, nodes, | 1001 | struct zoneref *z = next_zones_zonelist(zonelist->_zonerefs, |
| 1004 | zone); | 1002 | highest_zoneidx, nodes); |
| 1003 | *zone = zonelist_zone(z); | ||
| 1004 | return z; | ||
| 1005 | } | 1005 | } |
| 1006 | 1006 | ||
| 1007 | /** | 1007 | /** |
| @@ -1018,7 +1018,8 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, | |||
| 1018 | #define for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, nodemask) \ | 1018 | #define for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, nodemask) \ |
| 1019 | for (z = first_zones_zonelist(zlist, highidx, nodemask, &zone); \ | 1019 | for (z = first_zones_zonelist(zlist, highidx, nodemask, &zone); \ |
| 1020 | zone; \ | 1020 | zone; \ |
| 1021 | z = next_zones_zonelist(++z, highidx, nodemask, &zone)) \ | 1021 | z = next_zones_zonelist(++z, highidx, nodemask), \ |
| 1022 | zone = zonelist_zone(z)) \ | ||
| 1022 | 1023 | ||
| 1023 | /** | 1024 | /** |
| 1024 | * for_each_zone_zonelist - helper macro to iterate over valid zones in a zonelist at or below a given zone index | 1025 | * for_each_zone_zonelist - helper macro to iterate over valid zones in a zonelist at or below a given zone index |
diff --git a/mm/mmzone.c b/mm/mmzone.c index bf34fb8556db..7d87ebb0d632 100644 --- a/mm/mmzone.c +++ b/mm/mmzone.c | |||
| @@ -54,8 +54,7 @@ static inline int zref_in_nodemask(struct zoneref *zref, nodemask_t *nodes) | |||
| 54 | /* Returns the next zone at or below highest_zoneidx in a zonelist */ | 54 | /* Returns the next zone at or below highest_zoneidx in a zonelist */ |
| 55 | struct zoneref *next_zones_zonelist(struct zoneref *z, | 55 | struct zoneref *next_zones_zonelist(struct zoneref *z, |
| 56 | enum zone_type highest_zoneidx, | 56 | enum zone_type highest_zoneidx, |
| 57 | nodemask_t *nodes, | 57 | nodemask_t *nodes) |
| 58 | struct zone **zone) | ||
| 59 | { | 58 | { |
| 60 | /* | 59 | /* |
| 61 | * Find the next suitable zone to use for the allocation. | 60 | * Find the next suitable zone to use for the allocation. |
| @@ -69,7 +68,6 @@ struct zoneref *next_zones_zonelist(struct zoneref *z, | |||
| 69 | (z->zone && !zref_in_nodemask(z, nodes))) | 68 | (z->zone && !zref_in_nodemask(z, nodes))) |
| 70 | z++; | 69 | z++; |
| 71 | 70 | ||
| 72 | *zone = zonelist_zone(z); | ||
| 73 | return z; | 71 | return z; |
| 74 | } | 72 | } |
| 75 | 73 | ||
