Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1135
b: refs/heads/master
c: 7179906
h: refs/heads/master
i:
  1133: 7e2ea50
  1131: 0d97ceb
  1127: 31245b5
  1119: 480561a
v: v3
  • Loading branch information
Kirill Korotaev authored and Linus Torvalds committed May 17, 2005
1 parent 9b68d60 commit ac8d529
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 202d182a92c60416680e31baa697faa60b0882f5
refs/heads/master: 7179906293ebdc333f14a03d3e58b03604848f3c
7 changes: 6 additions & 1 deletion trunk/mm/mremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit ac8d529

Please sign in to comment.