summaryrefslogtreecommitdiffstats
path: root/mm/mremap.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-05-29 22:39:43 +0200
committerOlof Johansson <olof@lixom.net>2014-05-29 22:39:43 +0200
commit8320857b1d168fd17d7cee48bbfd04aaf6797be8 (patch)
tree58b31d3d9514df93974216f190824d73f9816d9f /mm/mremap.c
parentARM: multi_v7_defconfig: Enable Zynq peripheral drivers (diff)
parentLinux 3.15-rc6 (diff)
downloadlinux-8320857b1d168fd17d7cee48bbfd04aaf6797be8.tar.xz
linux-8320857b1d168fd17d7cee48bbfd04aaf6797be8.zip
Merge tag 'v3.15-rc6' into next/defconfig
Linux 3.15-rc6
Diffstat (limited to 'mm/mremap.c')
-rw-r--r--mm/mremap.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mm/mremap.c b/mm/mremap.c
index 0843feb66f3d..05f1180e9f21 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -194,10 +194,17 @@ unsigned long move_page_tables(struct vm_area_struct *vma,
break;
if (pmd_trans_huge(*old_pmd)) {
int err = 0;
- if (extent == HPAGE_PMD_SIZE)
+ if (extent == HPAGE_PMD_SIZE) {
+ VM_BUG_ON(vma->vm_file || !vma->anon_vma);
+ /* See comment in move_ptes() */
+ if (need_rmap_locks)
+ anon_vma_lock_write(vma->anon_vma);
err = move_huge_pmd(vma, new_vma, old_addr,
new_addr, old_end,
old_pmd, new_pmd);
+ if (need_rmap_locks)
+ anon_vma_unlock_write(vma->anon_vma);
+ }
if (err > 0) {
need_flush = true;
continue;