struct zonelist *zonelist, nodemask_t *nodemask)
{
struct zoneref *preferred_zoneref;
- struct page *page = NULL;
+ struct page *page;
unsigned int cpuset_mems_cookie;
unsigned int alloc_flags = ALLOC_WMARK_LOW|ALLOC_FAIR;
gfp_t alloc_mask; /* The gfp_t that was actually used for allocation */
/* The preferred zone is used for statistics later */
preferred_zoneref = first_zones_zonelist(ac.zonelist, ac.high_zoneidx,
ac.nodemask, &ac.preferred_zone);
- if (!ac.preferred_zone)
+ if (!ac.preferred_zone) {
+ page = NULL;
goto out;
+ }
+
ac.classzone_idx = zonelist_zone_idx(preferred_zoneref);
/* First allocation attempt */