[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220228063536.24911-5-songmuchun@bytedance.com>
Date: Mon, 28 Feb 2022 14:35:34 +0800
From: Muchun Song <songmuchun@...edance.com>
To: dan.j.williams@...el.com, willy@...radead.org, jack@...e.cz,
viro@...iv.linux.org.uk, akpm@...ux-foundation.org,
apopple@...dia.com, shy828301@...il.com, rcampbell@...dia.com,
hughd@...gle.com, xiyuyang19@...an.edu.cn,
kirill.shutemov@...ux.intel.com, zwisler@...nel.org,
hch@...radead.org
Cc: linux-fsdevel@...r.kernel.org, nvdimm@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
duanxiongchun@...edance.com, smuchun@...il.com,
Muchun Song <songmuchun@...edance.com>
Subject: [PATCH v3 4/6] mm: pvmw: add support for walking devmap pages
The devmap pages can not use page_vma_mapped_walk() to check if a huge
devmap page is mapped into a vma. Add support for walking huge devmap
pages so that DAX can use it in the next patch.
Signed-off-by: Muchun Song <songmuchun@...edance.com>
---
mm/page_vma_mapped.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c
index 1187f9c1ec5b..3f337e4e7f5f 100644
--- a/mm/page_vma_mapped.c
+++ b/mm/page_vma_mapped.c
@@ -210,10 +210,10 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
*/
pmde = READ_ONCE(*pvmw->pmd);
- if (pmd_trans_huge(pmde) || is_pmd_migration_entry(pmde)) {
+ if (pmd_leaf(pmde) || is_pmd_migration_entry(pmde)) {
pvmw->ptl = pmd_lock(mm, pvmw->pmd);
pmde = *pvmw->pmd;
- if (likely(pmd_trans_huge(pmde))) {
+ if (likely(pmd_leaf(pmde))) {
if (pvmw->flags & PVMW_MIGRATION)
return not_found(pvmw);
if (!check_pmd(pmd_pfn(pmde), pvmw))
--
2.11.0
Powered by blists - more mailing lists