Blame SOURCES/0044-devices-file-remove-extraneous-unlock-in-vgchange-u.patch

ab86b0
From d96432835532fbcd8c72694c6ed68fca3ce98d5c Mon Sep 17 00:00:00 2001
ab86b0
From: David Teigland <teigland@redhat.com>
ab86b0
Date: Wed, 13 Apr 2022 12:16:57 -0500
ab86b0
Subject: [PATCH 44/54] devices file: remove extraneous unlock in vgchange -u
ab86b0
ab86b0
vgchange -u exit path was unlocking the devices file in cases
ab86b0
when it wasn't needed, which produced an warning.
ab86b0
---
ab86b0
 lib/device/device_id.c | 7 +++----
ab86b0
 1 file changed, 3 insertions(+), 4 deletions(-)
ab86b0
ab86b0
diff --git a/lib/device/device_id.c b/lib/device/device_id.c
ab86b0
index 6133e700a..20901ab90 100644
ab86b0
--- a/lib/device/device_id.c
ab86b0
+++ b/lib/device/device_id.c
ab86b0
@@ -1272,15 +1272,15 @@ void device_id_update_vg_uuid(struct cmd_context *cmd, struct volume_group *vg,
ab86b0
 	int update = 0;
ab86b0
 
ab86b0
 	if (!cmd->enable_devices_file)
ab86b0
-		goto out;
ab86b0
+		return;
ab86b0
 
ab86b0
 	/* Without this setting there is no stacking LVs on PVs. */
ab86b0
 	if (!cmd->scan_lvs)
ab86b0
-		goto out;
ab86b0
+		return;
ab86b0
 
ab86b0
 	/* Check if any devices file entries are stacked on LVs. */
ab86b0
 	if (!_device_ids_use_lvmlv(cmd))
ab86b0
-		goto out;
ab86b0
+		return;
ab86b0
 
ab86b0
 	memcpy(old_vgid, old_vg_id, ID_LEN);
ab86b0
 	memcpy(new_vgid, &vg->id, ID_LEN);
ab86b0
@@ -1310,7 +1310,6 @@ void device_id_update_vg_uuid(struct cmd_context *cmd, struct volume_group *vg,
ab86b0
 	if (update &&
ab86b0
 	    !device_ids_write(cmd))
ab86b0
 		stack;
ab86b0
- out:
ab86b0
 	unlock_devices_file(cmd);
ab86b0
 }
ab86b0
 
ab86b0
-- 
ab86b0
2.34.3
ab86b0