diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 596180fedd3a..f7da2a2934b7 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1990,10 +1990,13 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, | |||
1990 | if (unlikely(!zonelist->_zonerefs->zone)) | 1990 | if (unlikely(!zonelist->_zonerefs->zone)) |
1991 | return NULL; | 1991 | return NULL; |
1992 | 1992 | ||
1993 | get_mems_allowed(); | ||
1993 | /* The preferred zone is used for statistics later */ | 1994 | /* The preferred zone is used for statistics later */ |
1994 | first_zones_zonelist(zonelist, high_zoneidx, nodemask, &preferred_zone); | 1995 | first_zones_zonelist(zonelist, high_zoneidx, nodemask, &preferred_zone); |
1995 | if (!preferred_zone) | 1996 | if (!preferred_zone) { |
1997 | put_mems_allowed(); | ||
1996 | return NULL; | 1998 | return NULL; |
1999 | } | ||
1997 | 2000 | ||
1998 | /* First allocation attempt */ | 2001 | /* First allocation attempt */ |
1999 | page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, nodemask, order, | 2002 | page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, nodemask, order, |
@@ -2003,6 +2006,7 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, | |||
2003 | page = __alloc_pages_slowpath(gfp_mask, order, | 2006 | page = __alloc_pages_slowpath(gfp_mask, order, |
2004 | zonelist, high_zoneidx, nodemask, | 2007 | zonelist, high_zoneidx, nodemask, |
2005 | preferred_zone, migratetype); | 2008 | preferred_zone, migratetype); |
2009 | put_mems_allowed(); | ||
2006 | 2010 | ||
2007 | trace_mm_page_alloc(page, order, gfp_mask, migratetype); | 2011 | trace_mm_page_alloc(page, order, gfp_mask, migratetype); |
2008 | return page; | 2012 | return page; |