mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
thp: do not mark zero-page pmd write-protected explicitly
Zero pages can be used only in anonymous mappings, which never have writable vma->vm_page_prot: see protection_map in mm/mmap.c and __PX1X definitions. Let's drop redundant pmd_wrprotect() in set_huge_zero_page(). Signed-off-by: "Kirill A. Shutemov" <kirill@shutemov.name> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
b047501cd9
commit
e544a4e74e
1 changed files with 0 additions and 1 deletions
|
@ -784,7 +784,6 @@ static bool set_huge_zero_page(pgtable_t pgtable, struct mm_struct *mm,
|
||||||
if (!pmd_none(*pmd))
|
if (!pmd_none(*pmd))
|
||||||
return false;
|
return false;
|
||||||
entry = mk_pmd(zero_page, vma->vm_page_prot);
|
entry = mk_pmd(zero_page, vma->vm_page_prot);
|
||||||
entry = pmd_wrprotect(entry);
|
|
||||||
entry = pmd_mkhuge(entry);
|
entry = pmd_mkhuge(entry);
|
||||||
pgtable_trans_huge_deposit(mm, pmd, pgtable);
|
pgtable_trans_huge_deposit(mm, pmd, pgtable);
|
||||||
set_pmd_at(mm, haddr, pmd, entry);
|
set_pmd_at(mm, haddr, pmd, entry);
|
||||||
|
|
Loading…
Reference in a new issue