From: Benjamin Herrenschmidt Date: Sun, 6 May 2007 21:50:14 +0000 (-0700) Subject: get_unmapped_area doesn't need hugetlbfs hacks anymore X-Git-Tag: v2.6.22-rc1~927 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4b1d89290b62bb2db476c94c82cf7442aab440c8;p=linux-2.6-omap-h63xx.git 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: Benjamin Herrenschmidt Acked-by: William 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: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/mmap.c b/mm/mmap.c index a6b7c796352..52646d61ff6 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -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; }