Signed-off-by: Peter Xu <peterx@xxxxxxxxxx> --- include/linux/userfaultfd_k.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h index ea11bed9bb7e..732b522bacb7 100644 --- a/include/linux/userfaultfd_k.h +++ b/include/linux/userfaultfd_k.h @@ -277,8 +277,12 @@ static inline bool uffd_disable_fault_around(struct vm_area_struct *vma) static inline bool pte_marker_entry_uffd_wp(swp_entry_t entry) { +#ifdef CONFIG_PTE_MARKER_UFFD_WP return is_pte_marker_entry(entry) && (pte_marker_get(entry) & PTE_MARKER_UFFD_WP); +#else + return false; +#endif } static inline bool pte_marker_uffd_wp(pte_t pte) -- 2.32.0 --3ob9n8+f6vq4lAWQ--