diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-22 17:59:49 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-22 17:59:49 +0100 |
commit | 2702e0a46c2d28da92b32c9b068ee1291fc0de35 (patch) | |
tree | c1e9868a4b91beeebd5f4e820588bc2ae8371911 /mm/mprotect.c | |
parent | 42bb8cc5e81028e217105299001070d57eb84ad7 (diff) | |
parent | adfafefd104d840ee4461965f22624d77532675b (diff) |
Merge branch 'linus' into timers/hpet
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r-- | mm/mprotect.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c index d0f6e7ce09f..258197b76fb 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -151,10 +151,11 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, /* * If we make a private mapping writable we increase our commit; * but (without finer accounting) cannot reduce our commit if we - * make it unwritable again. + * make it unwritable again. hugetlb mapping were accounted for + * even if read-only so there is no need to account for them here */ if (newflags & VM_WRITE) { - if (!(oldflags & (VM_ACCOUNT|VM_WRITE| + if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_HUGETLB| VM_SHARED|VM_NORESERVE))) { charged = nrpages; if (security_vm_enough_memory(charged)) @@ -217,8 +218,8 @@ fail: return error; } -asmlinkage long -sys_mprotect(unsigned long start, size_t len, unsigned long prot) +SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len, + unsigned long, prot) { unsigned long vm_flags, nstart, end, tmp, reqprot; struct vm_area_struct *vma, *prev; |