diff options
| author | <jgarzik@pretzel.yyz.us> | 2005-05-27 22:07:02 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-27 22:07:02 -0400 |
| commit | 1f15d694522af9cd7492695f11dd2dc77b6cf098 (patch) | |
| tree | 7f67a4c38456ec73359d576a5c602d18c3c3ef72 /mm/mremap.c | |
| parent | fff9cfd99c0f88645c3f50d7476d6c8cef99f140 (diff) | |
| parent | 254feb882a7c6e4e51416dff6a97d847fbbba551 (diff) | |
Automatic merge of /spare/repo/netdev-2.6 branch master
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 0dd7ace94e51..ec7238a78f36 100644 --- a/mm/mremap.c +++ b/mm/mremap.c | |||
| @@ -224,6 +224,12 @@ static unsigned long move_vma(struct vm_area_struct *vma, | |||
| 224 | split = 1; | 224 | split = 1; |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | /* | ||
| 228 | * if we failed to move page tables we still do total_vm increment | ||
| 229 | * since do_munmap() will decrement it by old_len == new_len | ||
| 230 | */ | ||
| 231 | mm->total_vm += new_len >> PAGE_SHIFT; | ||
| 232 | |||
| 227 | if (do_munmap(mm, old_addr, old_len) < 0) { | 233 | if (do_munmap(mm, old_addr, old_len) < 0) { |
| 228 | /* OOM: unable to split vma, just get accounts right */ | 234 | /* OOM: unable to split vma, just get accounts right */ |
| 229 | vm_unacct_memory(excess >> PAGE_SHIFT); | 235 | vm_unacct_memory(excess >> PAGE_SHIFT); |
| @@ -237,7 +243,6 @@ static unsigned long move_vma(struct vm_area_struct *vma, | |||
| 237 | vma->vm_next->vm_flags |= VM_ACCOUNT; | 243 | vma->vm_next->vm_flags |= VM_ACCOUNT; |
| 238 | } | 244 | } |
| 239 | 245 | ||
| 240 | mm->total_vm += new_len >> PAGE_SHIFT; | ||
| 241 | __vm_stat_account(mm, vma->vm_flags, vma->vm_file, new_len>>PAGE_SHIFT); | 246 | __vm_stat_account(mm, vma->vm_flags, vma->vm_file, new_len>>PAGE_SHIFT); |
| 242 | if (vm_flags & VM_LOCKED) { | 247 | if (vm_flags & VM_LOCKED) { |
| 243 | mm->locked_vm += new_len >> PAGE_SHIFT; | 248 | mm->locked_vm += new_len >> PAGE_SHIFT; |
