File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -1300,17 +1300,15 @@ static unsigned long
1300
1300
arch_get_unmapped_area_1 (unsigned long addr , unsigned long len ,
1301
1301
unsigned long limit )
1302
1302
{
1303
- struct vm_area_struct * vma = find_vma (current -> mm , addr );
1304
-
1305
- while (1 ) {
1306
- /* At this point: (!vma || addr < vma->vm_end). */
1307
- if (limit - len < addr )
1308
- return - ENOMEM ;
1309
- if (!vma || addr + len <= vma -> vm_start )
1310
- return addr ;
1311
- addr = vma -> vm_end ;
1312
- vma = vma -> vm_next ;
1313
- }
1303
+ struct vm_unmapped_area_info info ;
1304
+
1305
+ info .flags = 0 ;
1306
+ info .length = len ;
1307
+ info .low_limit = addr ;
1308
+ info .high_limit = limit ;
1309
+ info .align_mask = 0 ;
1310
+ info .align_offset = 0 ;
1311
+ return vm_unmapped_area (& info );
1314
1312
}
1315
1313
1316
1314
unsigned long
You can’t perform that action at this time.
0 commit comments