Commit 4b1d8929 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds
Browse files

get_unmapped_area doesn't need hugetlbfs hacks anymore

Remove the hugetlbfs specific hacks in toplevel get_unmapped_area() now that
all archs and hugetlbfs itself do the right thing for both cases.
Signed-off-by: default avatarBenjamin Herrenschmidt <>
Acked-by: default avatarWilliam Irwin <>
Cc: Paul Mackerras <>
Cc: Richard Henderson <>
Cc: Ivan Kokshaysky <>
Cc: Russell King <>
Cc: David Howells <>
Cc: Andi Kleen <>
Cc: "Luck, Tony" <>
Cc: Kyle McMartin <>
Cc: Grant Grundler <>
Cc: Matthew Wilcox <>
Cc: "David S. Miller" <>
Cc: Adam Litke <>
Cc: David Gibson <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 06abdfb4
......@@ -1382,22 +1382,6 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
if (addr & ~PAGE_MASK)
return -EINVAL;
if (file && is_file_hugepages(file)) {
* Check if the given range is hugepage aligned, and
* can be made suitable for hugepages.
ret = prepare_hugepage_range(addr, len, pgoff);
} else {
* Ensure that a normal request is not falling in a
* reserved hugepage range. For some archs like IA-64,
* there is a separate region for hugepages.
ret = is_hugepage_only_range(current->mm, addr, len);
if (ret)
return -EINVAL;
return addr;
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