Commit 2309f9e6 authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds

mm/page_alloc.c: remove hand-coded get_order()

Remove hand-coded get_order() from page_alloc.c.
Signed-off-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 97d87c97
...@@ -4345,9 +4345,7 @@ void *__init alloc_large_system_hash(const char *tablename, ...@@ -4345,9 +4345,7 @@ void *__init alloc_large_system_hash(const char *tablename,
else if (hashdist) else if (hashdist)
table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL); table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL);
else { else {
unsigned long order; unsigned long order = get_order(size);
for (order = 0; ((1UL << order) << PAGE_SHIFT) < size; order++)
;
table = (void*) __get_free_pages(GFP_ATOMIC, order); table = (void*) __get_free_pages(GFP_ATOMIC, order);
/* /*
* If bucketsize is not a power-of-two, we may free * If bucketsize is not a power-of-two, we may free
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment