lkml.org 
[lkml]   [2009]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 02/25] Do not sanity check order in the fast path
Date
> @@ -182,9 +182,6 @@ __alloc_pages(gfp_t gfp_mask, unsigned int order,
> static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
> unsigned int order)
> {
> - if (unlikely(order >= MAX_ORDER))
> - return NULL;
> -
> /* Unknown node is current node */
> if (nid < 0)
> nid = numa_node_id();
> @@ -198,9 +195,6 @@ extern struct page *alloc_pages_current(gfp_t gfp_mask, unsigned order);
> static inline struct page *
> alloc_pages(gfp_t gfp_mask, unsigned int order)
> {
> - if (unlikely(order >= MAX_ORDER))
> - return NULL;
> -
> return alloc_pages_current(gfp_mask, order);
> }
> extern struct page *alloc_page_vma(gfp_t gfp_mask,
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index dcc4f05..5028f40 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1405,6 +1405,8 @@ get_page_from_freelist(gfp_t gfp_mask, nodemask_t *nodemask, unsigned int order,
>
> classzone_idx = zone_idx(preferred_zone);
>
> + VM_BUG_ON(order >= MAX_ORDER);
> +

Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>






\
 
 \ /
  Last update: 2009-04-21 03:47    [W:0.452 / U:1.116 seconds]
©2003-2014 Jasper Spaans. Advertise on this site