From: Mathieu Desnoyers Date: Wed, 10 Feb 2021 17:33:38 +0000 (-0500) Subject: Fix: do not use bdi_unknown_name symbol X-Git-Tag: v2.13.0-rc1~43 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=dbabd7296e9bcfb263f96e78c185f1eb7346ee53;p=lttng-modules.git Fix: do not use bdi_unknown_name symbol 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. Signed-off-by: Mathieu Desnoyers Change-Id: I8b4e4fd84ecacef7942b308e615ca88db8dce7b6 --- diff --git a/include/instrumentation/events/writeback.h b/include/instrumentation/events/writeback.h index f24237b2..f05708a8 100644 --- a/include/instrumentation/events/writeback.h +++ b/include/instrumentation/events/writeback.h @@ -14,9 +14,12 @@ #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);