aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorMel Gorman <mel@csn.ul.ie>2009-06-16 18:31:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 22:47:32 -0400
commitb3c466ce512923298ae8c0121d3e9f397a3f1210 (patch)
treeca6f360a6dbaaa0a71b9375fb57d544364532254 /mm/page_alloc.c
parentd239171e4f6efd58d7e423853056b1b6a74f1446 (diff)
page allocator: do not sanity check order in the fast path
No user of the allocator API should be passing in an order >= MAX_ORDER but we check for it on each and every allocation. Delete this check and make it a VM_BUG_ON check further down the call path. [akpm@linux-foundation.org: s/VM_BUG_ON/WARN_ON_ONCE/] Signed-off-by: Mel Gorman <mel@csn.ul.ie> Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d58df9031503..bfbd95c0610f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1401,6 +1401,9 @@ get_page_from_freelist(gfp_t gfp_mask, nodemask_t *nodemask, unsigned int order,
1401 1401
1402 classzone_idx = zone_idx(preferred_zone); 1402 classzone_idx = zone_idx(preferred_zone);
1403 1403
1404 if (WARN_ON_ONCE(order >= MAX_ORDER))
1405 return NULL;
1406
1404zonelist_scan: 1407zonelist_scan:
1405 /* 1408 /*
1406 * Scan zonelist, looking for a zone with enough free. 1409 * Scan zonelist, looking for a zone with enough free.