summaryrefslogtreecommitdiffstats
path: root/mm/nommu.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-28 09:58:03 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-28 09:58:03 -0800
commite9738946fcb2e23c3bbf0d1bbed8ee2ed8a69038 (patch)
treea117477cca26b8610b4797aacd1e902430a4ee23 /mm/nommu.c
parent895c8b7b4623d4f55e260e5dee2574b4f7113105 (diff)
parentc07af4f1ce413d009ea76ee69099f06f73ce75b2 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "13 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm: add missing __PAGETABLE_{PUD,PMD}_FOLDED defines mm: page_alloc: revert inadvertent !__GFP_FS retry behavior change kernel/sys.c: fix UNAME26 for 4.0 mm: memcontrol: use "max" instead of "infinity" in control knobs zram: use proper type to update max_used_pages drivers/rtc/rtc-ds1685.c: fix conditional in ds1685_rtc_sysfs_time_regs_{show,store} nilfs2: fix potential memory overrun on inode scripts/gdb: add empty package initialization script rtc: ds1685: remove superfluous checks for out-of-range u8 values rtc: ds1685: fix ds1685_rtc_alarm_irq_enable build error memcg: fix low limit calculation mm/nommu: fix memory leak ocfs2: update web page + git tree in documentation
Diffstat (limited to 'mm/nommu.c')
-rw-r--r--mm/nommu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/nommu.c b/mm/nommu.c
index 7296360fc05..3e67e7538ec 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1213,11 +1213,9 @@ static int do_mmap_private(struct vm_area_struct *vma,
if (sysctl_nr_trim_pages && total - point >= sysctl_nr_trim_pages) {
total = point;
kdebug("try to alloc exact %lu pages", total);
- base = alloc_pages_exact(len, GFP_KERNEL);
- } else {
- base = (void *)__get_free_pages(GFP_KERNEL, order);
}
+ base = alloc_pages_exact(total << PAGE_SHIFT, GFP_KERNEL);
if (!base)
goto enomem;