diff options
Diffstat (limited to 'tools/vgchange.c')
-rw-r--r-- | tools/vgchange.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c index 4aac36a17..bdf2b1c41 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -31,19 +31,13 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd, struct list *lvh; struct logical_volume *lv; int count = 0; - char lvidbuf[128]; list_iterate(lvh, &vg->lvs) { lv = list_item(lvh, struct lv_list)->lv; - if (!lvid(lv, lvidbuf, sizeof(lvidbuf))) + if (!lock_vol(cmd, lv->lvid.s, lock | LCK_NONBLOCK)) continue; - if (!lock_vol(cmd, lvidbuf, lock | LCK_NONBLOCK)) - continue; - - lock_vol(cmd, lvidbuf, LCK_LV_UNLOCK); - count++; } |