|
@@ -375,7 +375,7 @@ nocache:
|
|
|
/* find starting point for our search */
|
|
|
if (free_vmap_cache) {
|
|
|
first = rb_entry(free_vmap_cache, struct vmap_area, rb_node);
|
|
|
- addr = ALIGN(first->va_end + PAGE_SIZE, align);
|
|
|
+ addr = ALIGN(first->va_end, align);
|
|
|
if (addr < vstart)
|
|
|
goto nocache;
|
|
|
if (addr + size - 1 < addr)
|
|
@@ -406,10 +406,10 @@ nocache:
|
|
|
}
|
|
|
|
|
|
/* from the starting point, walk areas until a suitable hole is found */
|
|
|
- while (addr + size >= first->va_start && addr + size <= vend) {
|
|
|
+ while (addr + size > first->va_start && addr + size <= vend) {
|
|
|
if (addr + cached_hole_size < first->va_start)
|
|
|
cached_hole_size = first->va_start - addr;
|
|
|
- addr = ALIGN(first->va_end + PAGE_SIZE, align);
|
|
|
+ addr = ALIGN(first->va_end, align);
|
|
|
if (addr + size - 1 < addr)
|
|
|
goto overflow;
|
|
|
|