From 123b90ce05b3c0dc9dc4dec62be617d41a4dc212 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Mon, 18 Oct 2010 17:27:10 +0000 Subject: [PATCH] Avoid an extraneous orphans unlock in vgextend --restoremissing. --- tools/vgextend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/vgextend.c b/tools/vgextend.c index 2ae24f7d1..f91b1d3f3 100644 --- a/tools/vgextend.c +++ b/tools/vgextend.c @@ -133,7 +133,8 @@ int vgextend(struct cmd_context *cmd, int argc, char **argv) r = ECMD_PROCESSED; bad: - unlock_vg(cmd, VG_ORPHANS); + if (!arg_count(cmd, restoremissing_ARG)) + unlock_vg(cmd, VG_ORPHANS); unlock_and_release_vg(cmd, vg, vg_name); return r; } -- 2.43.5