The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <stable@xxxxxxxxxxxxxxx>. To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x d659b715e94ac039803d7601505d3473393fc0be # <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<stable@xxxxxxxxxxxxxxx>' --in-reply-to '2024072952-envision-salvation-6c3a@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: d659b715e94a ("mm/huge_memory: avoid PMD-size page cache if needed") e0ffb29bc54d ("mm: simplify thp_vma_allowable_order") 19eaf44954df ("mm: thp: support allocation of anonymous multi-size THP") 3485b88390b0 ("mm: thp: introduce multi-size THP sysfs interface") 7a81751fcdeb ("mm/thp: fix "mm: thp: kill __transhuge_page_enabled()"") 5003a2bdf688 ("mm: call update_mmu_cache_range() in more page fault handling paths") daa60ae64c65 ("mm,thp: fix smaps THPeligible output alignment") 3db82b9374ca ("mm/memory: allow pte_offset_map[_lock]() to fail") 3b65f437d9e8 ("mm: fix failure to unmap pte on highmem systems") 2bad466cc9d9 ("mm/uffd: UFFD_FEATURE_WP_UNPOPULATED") 3c556d2425b0 ("mm/thp: rename TRANSPARENT_HUGEPAGE_NEVER_DAX to _UNSUPPORTED") 28d41a486331 ("mm: convert wp_page_copy() to use folios") cb3184deef10 ("mm: convert do_anonymous_page() to use a folio") 6bc56a4d8553 ("mm: add vma_alloc_zeroed_movable_folio()") 2cf1338454a8 ("mm: fix khugepaged with shmem_enabled=advise") d1751118c886 ("mm/uffd: detect pgtable allocation failures") a79390f5d6a7 ("mm/mprotect: use long for page accountings and retval") 1ef488edd6c4 ("mm/mprotect: drop pgprot_t parameter from change_protection()") 931298e103c2 ("mm/userfaultfd: rely on vma->vm_page_prot in uffd_wp_range()") fed15f1345dc ("mm/hugetlb: pre-allocate pgtable pages for uffd wr-protects") thanks, greg k-h ------------------ original commit in Linus's tree ------------------