Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-12-04 09:08:30 +0100
committerTakashi Iwai <tiwai@suse.de>2017-12-04 09:08:30 +0100
commit824eb95eab86365279ba081951431b13bb8ea2a7 (patch)
tree29a7692e85a041f75a24fd8271deabe7a8e57551
parentc1e4b2ecf95d26efe98f874f7fbfb3cd3759a309 (diff)
parent277921cc3c414fc1d568dbe2231750b48d6bce63 (diff)
Merge branch 'users/mhocko/SLE12-SP3/bnc1069496' into SLE12-SP3-fastpathrpm-4.4.92-6.30
-rw-r--r--mm/huge_memory.c6
-rw-r--r--mm/migrate.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 9b8f8c9887fc..71d9298d314f 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -711,7 +711,7 @@ __setup("transparent_hugepage=", setup_transparent_hugepage);
pmd_t maybe_pmd_mkwrite(pmd_t pmd, struct vm_area_struct *vma)
{
if (likely(vma->vm_flags & VM_WRITE))
- pmd = pmd_mkwrite(pmd_mkdirty(pmd));
+ pmd = pmd_mkwrite(pmd);
return pmd;
}
@@ -781,7 +781,7 @@ static int __do_huge_pmd_anonymous_page(struct mm_struct *mm,
}
entry = mk_huge_pmd(page, vma->vm_page_prot);
- entry = maybe_pmd_mkwrite(entry, vma);
+ entry = maybe_pmd_mkwrite(pmd_mkdirty(entry), vma);
page_add_new_anon_rmap(page, vma, haddr);
mem_cgroup_commit_charge(page, memcg, false);
lru_cache_add_active_or_unevictable(page, vma);
@@ -2727,7 +2727,7 @@ static void collapse_huge_page(struct mm_struct *mm,
pgtable = pmd_pgtable(_pmd);
_pmd = mk_huge_pmd(new_page, vma->vm_page_prot);
- _pmd = maybe_pmd_mkwrite(_pmd, vma);
+ _pmd = maybe_pmd_mkwrite(pmd_mkdirty(_pmd), vma);
/*
* spin_lock() below is not the equivalent of smp_wmb(), so
diff --git a/mm/migrate.c b/mm/migrate.c
index e04dd419bce6..ad1bc4af8cc2 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1815,7 +1815,7 @@ fail_putback:
orig_entry = *pmd;
entry = mk_pmd(new_page, vma->vm_page_prot);
entry = pmd_mkhuge(entry);
- entry = maybe_pmd_mkwrite(entry, vma);
+ entry = maybe_pmd_mkwrite(pmd_mkdirty(entry), vma);
/*
* Clear the old entry under pagetable lock and establish the new PTE.