diff options
-rw-r--r-- | mm/vmalloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 5d6030235d7a..4581ddcdda50 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -375,7 +375,7 @@ nocache: | |||
375 | /* find starting point for our search */ | 375 | /* find starting point for our search */ |
376 | if (free_vmap_cache) { | 376 | if (free_vmap_cache) { |
377 | first = rb_entry(free_vmap_cache, struct vmap_area, rb_node); | 377 | first = rb_entry(free_vmap_cache, struct vmap_area, rb_node); |
378 | addr = ALIGN(first->va_end + PAGE_SIZE, align); | 378 | addr = ALIGN(first->va_end, align); |
379 | if (addr < vstart) | 379 | if (addr < vstart) |
380 | goto nocache; | 380 | goto nocache; |
381 | if (addr + size - 1 < addr) | 381 | if (addr + size - 1 < addr) |
@@ -406,10 +406,10 @@ nocache: | |||
406 | } | 406 | } |
407 | 407 | ||
408 | /* from the starting point, walk areas until a suitable hole is found */ | 408 | /* from the starting point, walk areas until a suitable hole is found */ |
409 | while (addr + size >= first->va_start && addr + size <= vend) { | 409 | while (addr + size > first->va_start && addr + size <= vend) { |
410 | if (addr + cached_hole_size < first->va_start) | 410 | if (addr + cached_hole_size < first->va_start) |
411 | cached_hole_size = first->va_start - addr; | 411 | cached_hole_size = first->va_start - addr; |
412 | addr = ALIGN(first->va_end + PAGE_SIZE, align); | 412 | addr = ALIGN(first->va_end, align); |
413 | if (addr + size - 1 < addr) | 413 | if (addr + size - 1 < addr) |
414 | goto overflow; | 414 | goto overflow; |
415 | 415 | ||