diff options
author | <jgarzik@pretzel.yyz.us> | 2005-05-26 01:47:10 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-26 01:47:10 -0400 |
commit | 949d33e70f2c3e93bfe5265a50e40175b1ab1ec1 (patch) | |
tree | ca88fd8f8f81b167dc4685ed34e9636f267db60d /mm/mremap.c | |
parent | b095518ef51c37658c58367bd19240b8a113f25c (diff) | |
parent | bef9c558841604116704e10b3d9ff3dbf4939423 (diff) | |
download | kernel_samsung_tuna-949d33e70f2c3e93bfe5265a50e40175b1ab1ec1.zip kernel_samsung_tuna-949d33e70f2c3e93bfe5265a50e40175b1ab1ec1.tar.gz kernel_samsung_tuna-949d33e70f2c3e93bfe5265a50e40175b1ab1ec1.tar.bz2 |
Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git branch HEAD
Diffstat (limited to 'mm/mremap.c')
-rw-r--r-- | mm/mremap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/mremap.c b/mm/mremap.c index 0dd7ace..ec7238a 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -224,6 +224,12 @@ static unsigned long move_vma(struct vm_area_struct *vma, split = 1; } + /* + * if we failed to move page tables we still do total_vm increment + * since do_munmap() will decrement it by old_len == new_len + */ + mm->total_vm += new_len >> PAGE_SHIFT; + if (do_munmap(mm, old_addr, old_len) < 0) { /* OOM: unable to split vma, just get accounts right */ vm_unacct_memory(excess >> PAGE_SHIFT); @@ -237,7 +243,6 @@ static unsigned long move_vma(struct vm_area_struct *vma, vma->vm_next->vm_flags |= VM_ACCOUNT; } - mm->total_vm += new_len >> PAGE_SHIFT; __vm_stat_account(mm, vma->vm_flags, vma->vm_file, new_len>>PAGE_SHIFT); if (vm_flags & VM_LOCKED) { mm->locked_vm += new_len >> PAGE_SHIFT; |