summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-03-26 23:28:23 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-04-26 06:56:19 +0300
commite06d03d5590ae1c257b8aa2cfbfe6765e0755c14 (patch)
treee1300c67bcfaff343e73595ccb961ea082af64a3 /include/linux
parent5beaee54a324ba1fe307e341ec825d5d099f4091 (diff)
downloadlinux-e06d03d5590ae1c257b8aa2cfbfe6765e0755c14.tar.xz
mm: add pmd_folio()
Convert directly from a pmd to a folio without going through another representation first. For now this is just a slightly shorter way to write it, but it might end up being more efficient later. Link: https://lkml.kernel.org/r/20240326202833.523759-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pgtable.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index 600e17d03659..09c85c7bf9c2 100644
--- a/include/linux/pgtable.h
+++ b/include/linux/pgtable.h
@@ -50,6 +50,8 @@
#define pmd_pgtable(pmd) pmd_page(pmd)
#endif
+#define pmd_folio(pmd) page_folio(pmd_page(pmd))
+
/*
* A page table page can be thought of an array like this: pXd_t[PTRS_PER_PxD]
*