diff options
Diffstat (limited to 'arch/x86/mm/hugetlbpage.c')
-rw-r--r-- | arch/x86/mm/hugetlbpage.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index f581a18c0d4d..8ecbb4bba4b3 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c | |||
@@ -333,13 +333,15 @@ try_again: | |||
333 | * Lookup failure means no vma is above this address, | 333 | * Lookup failure means no vma is above this address, |
334 | * i.e. return with success: | 334 | * i.e. return with success: |
335 | */ | 335 | */ |
336 | if (!(vma = find_vma_prev(mm, addr, &prev_vma))) | 336 | vma = find_vma(mm, addr); |
337 | if (!vma) | ||
337 | return addr; | 338 | return addr; |
338 | 339 | ||
339 | /* | 340 | /* |
340 | * new region fits between prev_vma->vm_end and | 341 | * new region fits between prev_vma->vm_end and |
341 | * vma->vm_start, use it: | 342 | * vma->vm_start, use it: |
342 | */ | 343 | */ |
344 | prev_vma = vma->vm_prev; | ||
343 | if (addr + len <= vma->vm_start && | 345 | if (addr + len <= vma->vm_start && |
344 | (!prev_vma || (addr >= prev_vma->vm_end))) { | 346 | (!prev_vma || (addr >= prev_vma->vm_end))) { |
345 | /* remember the address as a hint for next time */ | 347 | /* remember the address as a hint for next time */ |