X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=mm%2Fnommu.c;h=3e67e7538ecf048b32463abdf8c7eaf1107dcd15;hb=da616534ed7f6e8ffaab699258b55c8d78d0b4ea;hp=7296360fc057e5bbf67b9904501fdbe98a97b1b2;hpb=01945fa248ff6d34f5fdb8106118910b77b76f91;p=deliverable%2Flinux.git diff --git a/mm/nommu.c b/mm/nommu.c index 7296360fc057..3e67e7538ecf 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;