mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[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]>
This commit is contained in:
parent
06abdfb47e
commit
4b1d89290b
1 changed files with 0 additions and 16 deletions
16
mm/mmap.c
16
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue