summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorChas Williams <chas3@att.com>2018-09-06 18:10:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-26 09:33:52 +0300
commitdd6ff2938d7be1a4eecdd7ba9af466959c95df3b (patch)
treeedb3a89b4e97827424f80ff27e23f007b80ab743 /mm
parent566f4e263c0d13b2d34199fa1f4c337453369d19 (diff)
downloadlinux-dd6ff2938d7be1a4eecdd7ba9af466959c95df3b.tar.xz
Fixes: Commit 86af955d02bb ("mm: numa: avoid waiting on freed migrated pages")
Commit 86af955d02bb ("mm: numa: avoid waiting on freed migrated pages") was an incomplete backport of the upstream commit. It is necessary to always reset page_nid before attempting any early exit. The original commit conflicted due to lack of commit 82b0f8c39a38 ("mm: join struct fault_env and vm_fault") in 4.9 so it wasn't a clean application, and the change must have just gotten lost in the noise. Signed-off-by: Chas Williams <chas3@att.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/huge_memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 690d172436c4..bc402f39ac48 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1329,12 +1329,12 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
/* Migration could have started since the pmd_trans_migrating check */
if (!page_locked) {
+ page_nid = -1;
if (!get_page_unless_zero(page))
goto out_unlock;
spin_unlock(ptl);
wait_on_page_locked(page);
put_page(page);
- page_nid = -1;
goto out;
}