diff options
author | Mel Gorman <mgorman@techsingularity.net> | 2016-05-19 20:13:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-19 22:12:14 -0400 |
commit | 5bb1b169757875a72e05bfcbb76e22602cb1a760 (patch) | |
tree | 9d57dd2f45765596feeb8f3518fe5ba165ad4244 /mm/page_alloc.c | |
parent | be06af002f6d50de10fd602ce3a6aa5d28e88d38 (diff) |
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: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 1096ac8f5ed1..f9ca6cc553c7 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -3347,7 +3347,7 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, | |||
3347 | struct zonelist *zonelist, nodemask_t *nodemask) | 3347 | struct zonelist *zonelist, nodemask_t *nodemask) |
3348 | { | 3348 | { |
3349 | struct zoneref *preferred_zoneref; | 3349 | struct zoneref *preferred_zoneref; |
3350 | struct page *page = NULL; | 3350 | struct page *page; |
3351 | unsigned int cpuset_mems_cookie; | 3351 | unsigned int cpuset_mems_cookie; |
3352 | unsigned int alloc_flags = ALLOC_WMARK_LOW|ALLOC_FAIR; | 3352 | unsigned int alloc_flags = ALLOC_WMARK_LOW|ALLOC_FAIR; |
3353 | gfp_t alloc_mask; /* The gfp_t that was actually used for allocation */ | 3353 | gfp_t alloc_mask; /* The gfp_t that was actually used for allocation */ |
@@ -3393,8 +3393,11 @@ retry_cpuset: | |||
3393 | /* The preferred zone is used for statistics later */ | 3393 | /* The preferred zone is used for statistics later */ |
3394 | preferred_zoneref = first_zones_zonelist(ac.zonelist, ac.high_zoneidx, | 3394 | preferred_zoneref = first_zones_zonelist(ac.zonelist, ac.high_zoneidx, |
3395 | ac.nodemask, &ac.preferred_zone); | 3395 | ac.nodemask, &ac.preferred_zone); |
3396 | if (!ac.preferred_zone) | 3396 | if (!ac.preferred_zone) { |
3397 | page = NULL; | ||
3397 | goto out; | 3398 | goto out; |
3399 | } | ||
3400 | |||
3398 | ac.classzone_idx = zonelist_zone_idx(preferred_zoneref); | 3401 | ac.classzone_idx = zonelist_zone_idx(preferred_zoneref); |
3399 | 3402 | ||
3400 | /* First allocation attempt */ | 3403 | /* First allocation attempt */ |