diff options
Diffstat (limited to 'mm/nommu.c')
-rw-r--r-- | mm/nommu.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index 7296360fc057..3fba2dc97c44 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -62,6 +62,7 @@ void *high_memory; | |||
62 | EXPORT_SYMBOL(high_memory); | 62 | EXPORT_SYMBOL(high_memory); |
63 | struct page *mem_map; | 63 | struct page *mem_map; |
64 | unsigned long max_mapnr; | 64 | unsigned long max_mapnr; |
65 | EXPORT_SYMBOL(max_mapnr); | ||
65 | unsigned long highest_memmap_pfn; | 66 | unsigned long highest_memmap_pfn; |
66 | struct percpu_counter vm_committed_as; | 67 | struct percpu_counter vm_committed_as; |
67 | int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ | 68 | int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ |
@@ -1213,11 +1214,9 @@ static int do_mmap_private(struct vm_area_struct *vma, | |||
1213 | if (sysctl_nr_trim_pages && total - point >= sysctl_nr_trim_pages) { | 1214 | if (sysctl_nr_trim_pages && total - point >= sysctl_nr_trim_pages) { |
1214 | total = point; | 1215 | total = point; |
1215 | kdebug("try to alloc exact %lu pages", total); | 1216 | kdebug("try to alloc exact %lu pages", total); |
1216 | base = alloc_pages_exact(len, GFP_KERNEL); | ||
1217 | } else { | ||
1218 | base = (void *)__get_free_pages(GFP_KERNEL, order); | ||
1219 | } | 1217 | } |
1220 | 1218 | ||
1219 | base = alloc_pages_exact(total << PAGE_SHIFT, GFP_KERNEL); | ||
1221 | if (!base) | 1220 | if (!base) |
1222 | goto enomem; | 1221 | goto enomem; |
1223 | 1222 | ||