|
@@ -1700,7 +1700,8 @@ bool move_huge_pmd(struct vm_area_struct *vma, struct vm_area_struct *new_vma,
|
|
|
pmd = pmdp_huge_get_and_clear(mm, old_addr, old_pmd);
|
|
|
VM_BUG_ON(!pmd_none(*new_pmd));
|
|
|
|
|
|
- if (pmd_move_must_withdraw(new_ptl, old_ptl)) {
|
|
|
+ if (pmd_move_must_withdraw(new_ptl, old_ptl) &&
|
|
|
+ vma_is_anonymous(vma)) {
|
|
|
pgtable_t pgtable;
|
|
|
pgtable = pgtable_trans_huge_withdraw(mm, old_pmd);
|
|
|
pgtable_trans_huge_deposit(mm, new_pmd, pgtable);
|