[PATCH] fixpatch
From: Lorenzo Stoakes
Date: Mon Nov 03 2025 - 12:08:07 EST
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
---
include/linux/leafops.h | 10 ++++++++++
include/linux/migrate.h | 1 -
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/linux/leafops.h b/include/linux/leafops.h
index 027209b63472..4af6fb87ac42 100644
--- a/include/linux/leafops.h
+++ b/include/linux/leafops.h
@@ -71,6 +71,7 @@ static inline pte_t leafent_to_pte(leaf_entry_t entry)
return swp_entry_to_pte(entry);
}
+#ifdef CONFIG_ARCH_ENABLE_THP_MIGRATION
/**
* leafent_from_pmd() - Obtain a leaf entry from a PMD entry.
* @pmd: PMD entry.
@@ -97,6 +98,15 @@ static inline leaf_entry_t leafent_from_pmd(pmd_t pmd)
return swp_entry(__swp_type(arch_entry), __swp_offset(arch_entry));
}
+#else
+
+static inline leaf_entry_t leafent_from_pmd(pmd_t pmd)
+{
+ return leafent_mk_none();
+}
+
+#endif
+
/**
* leafent_is_none() - Is the leaf entry empty?
* @entry: Leaf entry.
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 010b70c4dc3e..222cdc6ea792 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -6,7 +6,6 @@
#include <linux/mempolicy.h>
#include <linux/migrate_mode.h>
#include <linux/hugetlb.h>
-#include <linux/leafops.h>
typedef struct folio *new_folio_t(struct folio *folio, unsigned long private);
typedef void free_folio_t(struct folio *folio, unsigned long private);
--
2.51.0