Skip to content

Commit

Permalink
get_unmapped_area doesn't need hugetlbfs hacks anymore
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: William Irwin <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Russell King <[email protected]>
Cc: David Howells <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Kyle McMartin <[email protected]>
Cc: Grant Grundler <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Adam Litke <[email protected]>
Cc: David Gibson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ozbenh authored and Linus Torvalds committed May 7, 2007
1 parent 06abdfb commit 4b1d892
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4b1d892

Please sign in to comment.