summaryrefslogtreecommitdiffstats
path: root/mm/mempolicy.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-01-31 17:25:17 -0800
committerAndrew Morton <akpm@linux-foundation.org>2023-01-31 17:25:17 -0800
commit5ab0fc155dc0cac3b74584f7bc972569b0f8a57b (patch)
treefb43458b715be3a72c872bc4ce0e7c45e6f76ccb /mm/mempolicy.c
parent9a3f21fe5cb9f5654ccad7ba712d868f7de66e39 (diff)
parentac86f547ca1002aec2ef66b9e64d03f45bbbfbb9 (diff)
downloadlinux-5ab0fc155dc0cac3b74584f7bc972569b0f8a57b.tar.gz
linux-5ab0fc155dc0cac3b74584f7bc972569b0f8a57b.tar.bz2
linux-5ab0fc155dc0cac3b74584f7bc972569b0f8a57b.zip
Sync mm-stable with mm-hotfixes-stable to pick up dependent patches
Merge branch 'mm-hotfixes-stable' into mm-stable
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r--mm/mempolicy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 85a34f1f3ab8..72142fbe7652 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -600,7 +600,8 @@ static int queue_pages_hugetlb(pte_t *pte, unsigned long hmask,
/* With MPOL_MF_MOVE, we migrate only unshared hugepage. */
if (flags & (MPOL_MF_MOVE_ALL) ||
- (flags & MPOL_MF_MOVE && page_mapcount(page) == 1)) {
+ (flags & MPOL_MF_MOVE && page_mapcount(page) == 1 &&
+ !hugetlb_pmd_shared(pte))) {
if (isolate_hugetlb(page, qp->pagelist) &&
(flags & MPOL_MF_STRICT))
/*