[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210520025949.1866-1-songmuchun@bytedance.com>
Date: Thu, 20 May 2021 10:59:49 +0800
From: Muchun Song <songmuchun@...edance.com>
To: akpm@...ux-foundation.org, osalvador@...e.de,
mike.kravetz@...cle.com, mhocko@...e.com, david@...hat.com,
willy@...radead.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
duanxiongchun@...edance.com, zhengqi.arch@...edance.com,
fam.zheng@...edance.com, Muchun Song <songmuchun@...edance.com>,
Anshuman Khandual <anshuman.khandual@....com>
Subject: [PATCH] mm: migrate: fix missing update page_private to hugetlb_page_subpool
Since commit d6995da31122 ("hugetlb: use page.private for hugetlb specific
page flags") converts page.private for hugetlb specific page flags. We
should use hugetlb_page_subpool() to get the subpool pointer instead of
page_private(). The commit forgot to update it in the page migration
routine. So fix it.
Fixes: d6995da31122 ("hugetlb: use page.private for hugetlb specific page flags")
Reported-by: Anshuman Khandual <anshuman.khandual@....com>
Signed-off-by: Muchun Song <songmuchun@...edance.com>
---
mm/migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index e7a173da74ec..43419c4bb097 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1290,7 +1290,7 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
* page_mapping() set, hugetlbfs specific move page routine will not
* be called and we could leak usage counts for subpools.
*/
- if (page_private(hpage) && !page_mapping(hpage)) {
+ if (hugetlb_page_subpool(hpage) && !page_mapping(hpage)) {
rc = -EBUSY;
goto out_unlock;
}
--
2.11.0
Powered by blists - more mailing lists