Commit 5bb1b169 authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds

mm, page_alloc: remove unnecessary initialisation from __alloc_pages_nodemask()

page is guaranteed to be set before it is read with or without the
initialisation.

[akpm@linux-foundation.org: fix warning]
Signed-off-by: default avatarMel Gorman <mgorman@techsingularity.net>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent be06af00
...@@ -3347,7 +3347,7 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, ...@@ -3347,7 +3347,7 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
struct zonelist *zonelist, nodemask_t *nodemask) struct zonelist *zonelist, nodemask_t *nodemask)
{ {
struct zoneref *preferred_zoneref; struct zoneref *preferred_zoneref;
struct page *page = NULL; struct page *page;
unsigned int cpuset_mems_cookie; unsigned int cpuset_mems_cookie;
unsigned int alloc_flags = ALLOC_WMARK_LOW|ALLOC_FAIR; unsigned int alloc_flags = ALLOC_WMARK_LOW|ALLOC_FAIR;
gfp_t alloc_mask; /* The gfp_t that was actually used for allocation */ gfp_t alloc_mask; /* The gfp_t that was actually used for allocation */
...@@ -3393,8 +3393,11 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, ...@@ -3393,8 +3393,11 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
/* The preferred zone is used for statistics later */ /* The preferred zone is used for statistics later */
preferred_zoneref = first_zones_zonelist(ac.zonelist, ac.high_zoneidx, preferred_zoneref = first_zones_zonelist(ac.zonelist, ac.high_zoneidx,
ac.nodemask, &ac.preferred_zone); ac.nodemask, &ac.preferred_zone);
if (!ac.preferred_zone) if (!ac.preferred_zone) {
page = NULL;
goto out; goto out;
}
ac.classzone_idx = zonelist_zone_idx(preferred_zoneref); ac.classzone_idx = zonelist_zone_idx(preferred_zoneref);
/* First allocation attempt */ /* First allocation attempt */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment