Fix: build on sles15sp4
[lttng-modules.git] / include / wrapper / mm.h
index 12b58be782fd65786a9d406175b262d10aa7348f..047d9368971527e68b1c7d7e15cc2dae383cdb41 100644 (file)
 
 #include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0) \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
+static inline
+void wrapper_vm_flags_set(struct vm_area_struct *vma,
+               vm_flags_t flags)
+{
+       vm_flags_set(vma, flags);
+}
+#else
+static inline
+void wrapper_vm_flags_set(struct vm_area_struct *vma,
+               vm_flags_t flags)
+{
+       vma->vm_flags |= flags;
+}
+#endif
+
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0) \
                || LTTNG_UBUNTU_KERNEL_RANGE(4,4,25,44, 4,5,0,0))
 
 /*
@@ -40,31 +56,4 @@ bool wrapper_check_enough_free_pages(unsigned long num_pages)
 }
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
-static inline
-void wrapper_set_current_oom_origin(void)
-{
-       return set_current_oom_origin();
-}
-
-static inline
-void wrapper_clear_current_oom_origin(void)
-{
-       return clear_current_oom_origin();
-}
-
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
-
-static inline
-void wrapper_set_current_oom_origin(void)
-{
-       return;
-}
-
-static inline
-void wrapper_clear_current_oom_origin(void)
-{
-       return;
-}
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
 #endif /* _LTTNG_WRAPPER_MM_H */
This page took 0.023122 seconds and 4 git commands to generate.