From: Michael Jeanson Date: Sun, 23 Jan 2022 18:04:47 +0000 (-0500) Subject: fix: block: remove GENHD_FL_SUPPRESS_PARTITION_INFO (v5.17) X-Git-Tag: v2.13.2~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a88ee460b93c67ca756bd91ee9a8660813f65bd8;p=lttng-modules.git fix: block: remove GENHD_FL_SUPPRESS_PARTITION_INFO (v5.17) See upstream commit : commit 3b5149ac50970669ee0ddb9629ec77ffd5c0622d Author: Christoph Hellwig Date: Mon Nov 22 14:06:21 2021 +0100 block: remove GENHD_FL_SUPPRESS_PARTITION_INFO This flag is not set directly anywhere and only inherited from GENHD_FL_HIDDEN. Just check for GENHD_FL_HIDDEN instead. Link: https://lore.kernel.org/r/20211122130625.1136848-11-hch@lst.de Change-Id: Ide92bdaaff7d16e96be23aaf00cebeaa601235b7 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/wrapper/genhd.h b/include/wrapper/genhd.h index 68980388..3c6dbcbe 100644 --- a/include/wrapper/genhd.h +++ b/include/wrapper/genhd.h @@ -14,6 +14,12 @@ #include +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0)) +#define LTTNG_GENHD_FL_HIDDEN GENHD_FL_HIDDEN +#else +#define LTTNG_GENHD_FL_HIDDEN GENHD_FL_SUPPRESS_PARTITION_INFO +#endif + #ifdef CONFIG_KALLSYMS_ALL #include diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c index c5fca89d..4d7b2921 100644 --- a/src/lttng-statedump-impl.c +++ b/src/lttng-statedump-impl.c @@ -334,7 +334,7 @@ int lttng_enumerate_block_devices(struct lttng_kernel_session *session) * suppressed */ if (get_capacity(disk) == 0 || - (disk->flags & GENHD_FL_SUPPRESS_PARTITION_INFO)) + (disk->flags & LTTNG_GENHD_FL_HIDDEN)) continue; ret = lttng_statedump_each_block_device(session, disk);