From ba4f5d8080840a46bbd114ccd191dd23251924dc Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 17 Nov 2006 02:45:51 +0000 Subject: [PATCH] Fix pvremove error path for case when PV is in use. --- WHATS_NEW | 1 + tools/pvremove.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index e655a3206..82f30ad11 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.15 - ==================================== + Fix pvremove error path for case when PV is in use. Warn if certain duplicate config file entries are seen. Enhance lvm_dump.sh for sysreport integration and add man page. Fix --autobackup argument which could never disable backups. diff --git a/tools/pvremove.c b/tools/pvremove.c index c40af9efb..fe7335bbd 100644 --- a/tools/pvremove.c +++ b/tools/pvremove.c @@ -92,9 +92,9 @@ static int pvremove_single(struct cmd_context *cmd, const char *pv_name, } if (!dev_test_excl(dev)) { - log_error("Can't open %s exclusively. Mounted filesystem?", - dev_name(dev)); - return 0; + log_error("Can't open %s exclusively - not removing. " + "Mounted filesystem?", dev_name(dev)); + goto error; } /* Wipe existing label(s) */