Commit a321a55f authored by Linus Torvalds's avatar Linus Torvalds

Avoid taking i_shared lock while already holding the page

table lock
parent f2458453
...@@ -1121,7 +1121,6 @@ void exit_mmap(struct mm_struct * mm) ...@@ -1121,7 +1121,6 @@ void exit_mmap(struct mm_struct * mm)
unsigned long end = mpnt->vm_end; unsigned long end = mpnt->vm_end;
mm->map_count--; mm->map_count--;
remove_shared_vm_struct(mpnt);
unmap_page_range(tlb, mpnt, start, end); unmap_page_range(tlb, mpnt, start, end);
mpnt = mpnt->vm_next; mpnt = mpnt->vm_next;
} }
...@@ -1148,6 +1147,7 @@ void exit_mmap(struct mm_struct * mm) ...@@ -1148,6 +1147,7 @@ void exit_mmap(struct mm_struct * mm)
*/ */
while (mpnt) { while (mpnt) {
struct vm_area_struct * next = mpnt->vm_next; struct vm_area_struct * next = mpnt->vm_next;
remove_shared_vm_struct(mpnt);
if (mpnt->vm_ops) { if (mpnt->vm_ops) {
if (mpnt->vm_ops->close) if (mpnt->vm_ops->close)
mpnt->vm_ops->close(mpnt); mpnt->vm_ops->close(mpnt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment