aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/mm/hugetlbpage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c
index 34728e4afe48..6272a4fd9e7c 100644
--- a/arch/i386/mm/hugetlbpage.c
+++ b/arch/i386/mm/hugetlbpage.c
@@ -367,6 +367,12 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
367 if (len > TASK_SIZE) 367 if (len > TASK_SIZE)
368 return -ENOMEM; 368 return -ENOMEM;
369 369
370 if (flags & MAP_FIXED) {
371 if (prepare_hugepage_range(addr, len, pgoff))
372 return -EINVAL;
373 return addr;
374 }
375
370 if (addr) { 376 if (addr) {
371 addr = ALIGN(addr, HPAGE_SIZE); 377 addr = ALIGN(addr, HPAGE_SIZE);
372 vma = find_vma(mm, addr); 378 vma = find_vma(mm, addr);