All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - devices file: remove extraneous unlock in vgchange -u
Date: Wed, 13 Apr 2022 17:21:13 +0000 (GMT)	[thread overview]
Message-ID: <20220413172113.047FB3857C50@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=bee575d678399a45db09ec8fcba79eae3890ec54
Commit:        bee575d678399a45db09ec8fcba79eae3890ec54
Parent:        d14245c72425b99c3bc33a533da46962d010871a
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Wed Apr 13 12:16:57 2022 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Wed Apr 13 12:19:04 2022 -0500

devices file: remove extraneous unlock in vgchange -u

vgchange -u exit path was unlocking the devices file in cases
when it wasn't needed, which produced an warning.
---
 lib/device/device_id.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/device/device_id.c b/lib/device/device_id.c
index 6c7136d5f..f1928347c 100644
--- a/lib/device/device_id.c
+++ b/lib/device/device_id.c
@@ -1298,15 +1298,15 @@ void device_id_update_vg_uuid(struct cmd_context *cmd, struct volume_group *vg,
 	int update = 0;
 
 	if (!cmd->enable_devices_file)
-		goto out;
+		return;
 
 	/* Without this setting there is no stacking LVs on PVs. */
 	if (!cmd->scan_lvs)
-		goto out;
+		return;
 
 	/* Check if any devices file entries are stacked on LVs. */
 	if (!_device_ids_use_lvmlv(cmd))
-		goto out;
+		return;
 
 	memcpy(old_vgid, old_vg_id, ID_LEN);
 	memcpy(new_vgid, &vg->id, ID_LEN);
@@ -1336,7 +1336,6 @@ void device_id_update_vg_uuid(struct cmd_context *cmd, struct volume_group *vg,
 	if (update &&
 	    !device_ids_write(cmd))
 		stack;
- out:
 	unlock_devices_file(cmd);
 }
 


                 reply	other threads:[~2022-04-13 17:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220413172113.047FB3857C50@sourceware.org \
    --to=teigland@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.