fix: block: remove GENHD_FL_SUPPRESS_PARTITION_INFO (v5.17)
authorMichael Jeanson <mjeanson@efficios.com>
Sun, 23 Jan 2022 18:04:47 +0000 (13:04 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 28 Jan 2022 16:33:21 +0000 (11:33 -0500)
See upstream commit :

  commit 3b5149ac50970669ee0ddb9629ec77ffd5c0622d
  Author: Christoph Hellwig <hch@lst.de>
  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 <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-statedump-impl.c
wrapper/genhd.h

index 0b7d66610e7297f7ba3b8a778d40f2d1ad4915d5..a33759d43d34f1b2362c20b031e405a021e3ded7 100644 (file)
@@ -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);
index 98feb57bebde635fb11781209ca2871a8faafa0c..7559faaedd2e3fa52f9a288746e58c859c99262c 100644 (file)
 
 #include <linux/genhd.h>
 
+#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 <linux/kallsyms.h>
This page took 0.027677 seconds and 4 git commands to generate.