fix: Adjust ranges for Ubuntu 5.4.0-67 kernel
[lttng-modules.git] / instrumentation / events / lttng-module / writeback.h
index c988a9d7e83eb3440a305135ecb477d55a0f3d2d..55aa896c47a9b60edd32a55778b61c7fabaef107 100644 (file)
 #ifndef _TRACE_WRITEBACK_DEF_
 #define _TRACE_WRITEBACK_DEF_
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0) ||        \
-       LTTNG_KERNEL_RANGE(5,5,3, 5,6,0) ||                     \
-       LTTNG_KERNEL_RANGE(5,4,19, 5,5,0))
+/*
+ * Use the GPL-exported bdi_dev_name introduced in kernel 5.7. Do not use
+ * static inline bdi_dev_name in prior kernels because it uses the bdi_unknown_name
+ * symbol which is not exported to GPL modules.
+ */
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0))
 static inline const char *lttng_bdi_dev_name(struct backing_dev_info *bdi)
 {
        return bdi_dev_name(bdi);
@@ -62,7 +65,8 @@ static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode)
 
 #endif
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \
+       LTTNG_UBUNTU_KERNEL_RANGE(5,4,94,67, 5,5,0,0))
 #define show_inode_state(state)                                        \
        __print_flags(state, "|",                               \
                {I_DIRTY_SYNC,          "I_DIRTY_SYNC"},        \
This page took 0.029168 seconds and 4 git commands to generate.