diff --git a/mm/mmap.c b/mm/mmap.c index a6b7c796352bb37988cc8299d9ff2c09260dabcc..52646d61ff696235e88b11175641bf7de884afd3 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; }