summaryrefslogtreecommitdiffstats
path: root/tools/reporter.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/reporter.c')
-rw-r--r--tools/reporter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/reporter.c b/tools/reporter.c
index 1e352b51..d50d586a 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -132,8 +132,8 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
if (is_pv(pv) && !is_orphan(pv) && !vg) {
vg_name = pv_vg_name(pv);
- vg = vg_read(cmd, vg_name, (char *)&pv->vgid, 0);
- if (vg_read_error(vg)) {
+ if (!(vg = vg_lock_and_read(cmd, vg_name, (char *)&pv->vgid,
+ LCK_VG_READ, CLUSTERED, 0))) {
log_error("Skipping volume group %s", vg_name);
return ECMD_FAILED;
}