From d059dbd1acbaf6533f97fe81fd3b1f4ea125354f Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Sun, 23 Jan 2022 13:04:47 -0500 Subject: [PATCH] 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 --- lttng-statedump-impl.c | 2 +- wrapper/genhd.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c index 0b7d6661..a33759d4 100644 --- a/lttng-statedump-impl.c +++ b/lttng-statedump-impl.c @@ -328,7 +328,7 @@ int lttng_enumerate_block_devices(struct lttng_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); diff --git a/wrapper/genhd.h b/wrapper/genhd.h index 98feb57b..7559faae 100644 --- a/wrapper/genhd.h +++ b/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 -- 2.34.1