]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fixup! mm/uffd: PTE_MARKER_UFFD_WP
authorPeter Xu <peterx@redhat.com>
Thu, 14 Apr 2022 19:16:49 +0000 (12:16 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 14 Apr 2022 21:49:51 +0000 (17:49 -0400)
Link: https://lkml.kernel.org/r/YkzKiM8tI4+qOfXF@xz-m1.local
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/userfaultfd_k.h

index 4d7e0c89889f5ffb5d7a1671e407ff06c3e84960..e17a53c20b913a9b897643c9d99e3bc08cfc15f4 100644 (file)
@@ -239,8 +239,12 @@ static inline void userfaultfd_unmap_complete(struct mm_struct *mm,
 
 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)