ARM: OMAP: serial: Rename DRIVER_NAME
[cascardo/linux.git] / mm / mremap.c
index e55b157..d77946a 100644 (file)
@@ -192,25 +192,24 @@ unsigned long move_page_tables(struct vm_area_struct *vma,
                if (!new_pmd)
                        break;
                if (pmd_trans_huge(*old_pmd)) {
-                       int err = 0;
                        if (extent == HPAGE_PMD_SIZE) {
+                               bool moved;
                                VM_BUG_ON_VMA(vma->vm_file || !vma->anon_vma,
                                              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,
+                               moved = 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 (moved) {
+                                       need_flush = true;
+                                       continue;
+                               }
                        }
-                       if (err > 0) {
-                               need_flush = true;
-                               continue;
-                       } else if (!err) {
-                               split_huge_page_pmd(vma, old_addr, old_pmd);
-                       }
+                       split_huge_pmd(vma, old_pmd, old_addr);
                        VM_BUG_ON(pmd_trans_huge(*old_pmd));
                }
                if (pmd_none(*new_pmd) && __pte_alloc(new_vma->vm_mm, new_vma,