]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/mm.h
userfaultfd: shmem: introduce vma_is_shmem
[karo-tx-linux.git] / include / linux / mm.h
index c3e2be2b3296024327b4a56412b72b7f1838a250..bb997493e15d2c943312dbc82da5699d6b4e2919 100644 (file)
@@ -1383,6 +1383,16 @@ static inline bool vma_is_anonymous(struct vm_area_struct *vma)
        return !vma->vm_ops;
 }
 
+#ifdef CONFIG_SHMEM
+/*
+ * The vma_is_shmem is not inline because it is used only by slow
+ * paths in userfault.
+ */
+bool vma_is_shmem(struct vm_area_struct *vma);
+#else
+static inline bool vma_is_shmem(struct vm_area_struct *vma) { return false; }
+#endif
+
 static inline int stack_guard_page_start(struct vm_area_struct *vma,
                                             unsigned long addr)
 {