[PATCH] mm/memory: Pass head page to do_set_pmd()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The requirement that the head page be passed to do_set_pmd() was added
in commit ef37b2ea08ac ("mm/memory: page_add_file_rmap() ->
folio_add_file_rmap_[pte|pmd]()") and prevents pmd-mapping in the
finish_fault() path if vmf->page is anything but the head page for an
otherwise suitable vma and pmd-sized page. Have finish_fault() pass in
the head page instead.

Fixes: ef37b2ea08ac ("mm/memory: page_add_file_rmap() -> folio_add_file_rmap_[pte|pmd]()")
Signed-off-by: Andrew Bresticker <abrestic@xxxxxxxxxxxx>
---
 mm/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index 0f47a533014e..f13b953b507c 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -4764,7 +4764,7 @@ vm_fault_t finish_fault(struct vm_fault *vmf)
 
 	if (pmd_none(*vmf->pmd)) {
 		if (PageTransCompound(page)) {
-			ret = do_set_pmd(vmf, page);
+			ret = do_set_pmd(vmf, compound_head(page));
 			if (ret != VM_FAULT_FALLBACK)
 				return ret;
 		}
-- 
2.34.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux