summaryrefslogtreecommitdiffstats
path: root/tools/vgreduce.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/vgreduce.c')
-rw-r--r--tools/vgreduce.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/vgreduce.c b/tools/vgreduce.c
index f2b438f8..332b4dc1 100644
--- a/tools/vgreduce.c
+++ b/tools/vgreduce.c
@@ -397,8 +397,8 @@ static int _vgreduce_single(struct cmd_context *cmd, struct volume_group *vg,
}
vg->pv_count--;
- vg->free_count -= pv->pe_count - get_pv_pe_alloc_count(pv);
- vg->extent_count -= pv->pe_count;
+ vg->free_count -= get_pv_pe_count(pv) - get_pv_pe_alloc_count(pv);
+ vg->extent_count -= get_pv_pe_count(pv);
if (!vg_write(vg) || !vg_commit(vg)) {
log_error("Removal of physical volume \"%s\" from "