git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
mm
/
nommu.c
diff --git
a/mm/nommu.c
b/mm/nommu.c
index
60745e2
..
bf2a387
100644
(file)
--- a/
mm/nommu.c
+++ b/
mm/nommu.c
@@
-161,7
+161,7
@@
void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
/*
* kmalloc doesn't like __GFP_HIGHMEM for some reason
*/
/*
* kmalloc doesn't like __GFP_HIGHMEM for some reason
*/
- return kmalloc(size,
(gfp_mask | __GFP_COMP)
& ~__GFP_HIGHMEM);
+ return kmalloc(size,
gfp_mask
& ~__GFP_HIGHMEM);
}
struct page * vmalloc_to_page(void *addr)
}
struct page * vmalloc_to_page(void *addr)
@@
-625,7
+625,7
@@
static int do_mmap_private(struct vm_area_struct *vma, unsigned long len)
* - note that this may not return a page-aligned address if the object
* we're allocating is smaller than a page
*/
* - note that this may not return a page-aligned address if the object
* we're allocating is smaller than a page
*/
- base = kmalloc(len, GFP_KERNEL
|__GFP_COMP
);
+ base = kmalloc(len, GFP_KERNEL);
if (!base)
goto enomem;
if (!base)
goto enomem;
@@
-1149,26
+1149,14
@@
int __vm_enough_memory(long pages, int cap_sys_admin)
* only call if we're about to fail.
*/
n = nr_free_pages();
* only call if we're about to fail.
*/
n = nr_free_pages();
-
- /*
- * Leave reserved pages. The pages are not for anonymous pages.
- */
- if (n <= totalreserve_pages)
- goto error;
- else
- n -= totalreserve_pages;
-
- /*
- * Leave the last 3% for root
- */
if (!cap_sys_admin)
n -= n / 32;
free += n;
if (free > pages)
return 0;
if (!cap_sys_admin)
n -= n / 32;
free += n;
if (free > pages)
return 0;
-
-
goto error
;
+ vm_unacct_memory(pages);
+
return -ENOMEM
;
}
allowed = totalram_pages * sysctl_overcommit_ratio / 100;
}
allowed = totalram_pages * sysctl_overcommit_ratio / 100;
@@
-1189,7
+1177,7
@@
int __vm_enough_memory(long pages, int cap_sys_admin)
*/
if (atomic_read(&vm_committed_space) < (long)allowed)
return 0;
*/
if (atomic_read(&vm_committed_space) < (long)allowed)
return 0;
-error:
+
vm_unacct_memory(pages);
return -ENOMEM;
vm_unacct_memory(pages);
return -ENOMEM;