From b7e9ec0cbf55e4a4e1f027be49bf45b11beb5a76 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 1 Oct 2021 13:44:17 +0200 Subject: [PATCH] debug: fix stack tracing Emit stack trace only on log_error path, and avoid on 'expected' not-found path. --- lib/metadata/metadata.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index b3c8c6ece..f29e73c7c 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -5015,7 +5015,7 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const unlock_vg(cmd, NULL, vg_name); log_error("VG name not found for vgid %s", vgid); failure |= FAILED_NOTFOUND; - goto_bad; + goto bad; } /* @@ -5037,7 +5037,7 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const if (!(vg_read_flags & READ_OK_NOTFOUND)) log_error("Volume group \"%s\" not found", vg_name); failure |= FAILED_NOTFOUND; - goto_bad; + goto bad; } /* @@ -5053,7 +5053,7 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const if (!(vg_read_flags & READ_OK_NOTFOUND)) log_error("Volume group \"%s\" not found.", vg_name); failure |= FAILED_NOTFOUND; - goto_bad; + goto bad; } /* @@ -5264,7 +5264,7 @@ bad: /* caller must unlock_vg and release_vg */ *error_vg = vg; - return_NULL; + return NULL; } if (vg) {