diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/huge_memory.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index d7ee1691fd21..32754eece63e 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -1460,9 +1460,10 @@ int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, | |||
1460 | if (__pmd_trans_huge_lock(pmd, vma) == 1) { | 1460 | if (__pmd_trans_huge_lock(pmd, vma) == 1) { |
1461 | pmd_t entry; | 1461 | pmd_t entry; |
1462 | entry = pmdp_get_and_clear(mm, addr, pmd); | 1462 | entry = pmdp_get_and_clear(mm, addr, pmd); |
1463 | if (!prot_numa) | 1463 | if (!prot_numa) { |
1464 | entry = pmd_modify(entry, newprot); | 1464 | entry = pmd_modify(entry, newprot); |
1465 | else { | 1465 | BUG_ON(pmd_write(entry)); |
1466 | } else { | ||
1466 | struct page *page = pmd_page(*pmd); | 1467 | struct page *page = pmd_page(*pmd); |
1467 | 1468 | ||
1468 | /* only check non-shared pages */ | 1469 | /* only check non-shared pages */ |
@@ -1471,7 +1472,6 @@ int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, | |||
1471 | entry = pmd_mknuma(entry); | 1472 | entry = pmd_mknuma(entry); |
1472 | } | 1473 | } |
1473 | } | 1474 | } |
1474 | BUG_ON(pmd_write(entry)); | ||
1475 | set_pmd_at(mm, addr, pmd, entry); | 1475 | set_pmd_at(mm, addr, pmd, entry); |
1476 | spin_unlock(&vma->vm_mm->page_table_lock); | 1476 | spin_unlock(&vma->vm_mm->page_table_lock); |
1477 | ret = 1; | 1477 | ret = 1; |