projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b237ade
)
thp: run vma_adjust_trans_huge() outside i_mmap_rwsem
author
Kirill A. Shutemov
<
[email protected]
>
Tue, 26 Jul 2016 22:25:48 +0000
(15:25 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 26 Jul 2016 23:19:19 +0000
(16:19 -0700)
vma_addjust_trans_huge() splits pmd if it's crossing VMA boundary.
During split we munlock the huge page which requires rmap walk. rmap
wants to take the lock on its own.
Let's move vma_adjust_trans_huge() outside i_mmap_rwsem to fix this.
Link:
http://lkml.kernel.org/r/1466021202-61880-19-git-send-email-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/mmap.c
patch
|
blob
|
history
diff --git
a/mm/mmap.c
b/mm/mmap.c
index 234edffec1d0791251c631fc596b798dc49b7c91..31f9b2220b723e27dc9976650afeb7dc6141a2d2 100644
(file)
--- a/
mm/mmap.c
+++ b/
mm/mmap.c
@@
-675,6
+675,8
@@
again: remove_next = 1 + (end > next->vm_end);
}
}
+ vma_adjust_trans_huge(vma, start, end, adjust_next);
+
if (file) {
mapping = file->f_mapping;
root = &mapping->i_mmap;
@@
-695,8
+697,6
@@
again: remove_next = 1 + (end > next->vm_end);
}
}
- vma_adjust_trans_huge(vma, start, end, adjust_next);
-
anon_vma = vma->anon_vma;
if (!anon_vma && adjust_next)
anon_vma = next->anon_vma;