diff options
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 28 |
1 files changed, 0 insertions, 28 deletions
@@ -1878,15 +1878,6 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
1878 | } | 1878 | } |
1879 | #endif | 1879 | #endif |
1880 | 1880 | ||
1881 | void arch_unmap_area(struct mm_struct *mm, unsigned long addr) | ||
1882 | { | ||
1883 | /* | ||
1884 | * Is this a new hole at the lowest possible address? | ||
1885 | */ | ||
1886 | if (addr >= TASK_UNMAPPED_BASE && addr < mm->free_area_cache) | ||
1887 | mm->free_area_cache = addr; | ||
1888 | } | ||
1889 | |||
1890 | /* | 1881 | /* |
1891 | * This mmap-allocator allocates new areas top-down from below the | 1882 | * This mmap-allocator allocates new areas top-down from below the |
1892 | * stack's low limit (the base): | 1883 | * stack's low limit (the base): |
@@ -1943,19 +1934,6 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | |||
1943 | } | 1934 | } |
1944 | #endif | 1935 | #endif |
1945 | 1936 | ||
1946 | void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr) | ||
1947 | { | ||
1948 | /* | ||
1949 | * Is this a new hole at the highest possible address? | ||
1950 | */ | ||
1951 | if (addr > mm->free_area_cache) | ||
1952 | mm->free_area_cache = addr; | ||
1953 | |||
1954 | /* dont allow allocations above current base */ | ||
1955 | if (mm->free_area_cache > mm->mmap_base) | ||
1956 | mm->free_area_cache = mm->mmap_base; | ||
1957 | } | ||
1958 | |||
1959 | unsigned long | 1937 | unsigned long |
1960 | get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, | 1938 | get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, |
1961 | unsigned long pgoff, unsigned long flags) | 1939 | unsigned long pgoff, unsigned long flags) |
@@ -2376,7 +2354,6 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2376 | { | 2354 | { |
2377 | struct vm_area_struct **insertion_point; | 2355 | struct vm_area_struct **insertion_point; |
2378 | struct vm_area_struct *tail_vma = NULL; | 2356 | struct vm_area_struct *tail_vma = NULL; |
2379 | unsigned long addr; | ||
2380 | 2357 | ||
2381 | insertion_point = (prev ? &prev->vm_next : &mm->mmap); | 2358 | insertion_point = (prev ? &prev->vm_next : &mm->mmap); |
2382 | vma->vm_prev = NULL; | 2359 | vma->vm_prev = NULL; |
@@ -2393,11 +2370,6 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2393 | } else | 2370 | } else |
2394 | mm->highest_vm_end = prev ? prev->vm_end : 0; | 2371 | mm->highest_vm_end = prev ? prev->vm_end : 0; |
2395 | tail_vma->vm_next = NULL; | 2372 | tail_vma->vm_next = NULL; |
2396 | if (mm->unmap_area == arch_unmap_area) | ||
2397 | addr = prev ? prev->vm_end : mm->mmap_base; | ||
2398 | else | ||
2399 | addr = vma ? vma->vm_start : mm->mmap_base; | ||
2400 | mm->unmap_area(mm, addr); | ||
2401 | mm->mmap_cache = NULL; /* Kill the cache. */ | 2373 | mm->mmap_cache = NULL; /* Kill the cache. */ |
2402 | } | 2374 | } |
2403 | 2375 | ||