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 15:30:43 +0000 (10:30 -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>
include/wrapper/genhd.h
src/lttng-statedump-impl.c

index 689803881dbb0f9a950c651d48aa4b9a11e83564..3c6dbcbe41a386e6c0bfa593c6c3bf479009f399 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>
index c5fca89df8fa2bc83d0c67467d420c093060254f..4d7b2921f1bac52ba43a6a271f69ff3aa8865ca2 100644 (file)
@@ -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);
This page took 0.027711 seconds and 4 git commands to generate.