diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 33a4f7d0f..d4a4b8bc7 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -6633,6 +6633,12 @@ int remove_layers_for_segments_all(struct cmd_context *cmd, if (!lv_empty(layer_lv)) return_0; + /* Assumes only used by PVMOVE ATM when unlocking LVs */ + dm_list_iterate_items(lvl, lvs_changed) { + /* FIXME Assumes only one pvmove at a time! */ + lvl->lv->status &= ~LOCKED; + } + return 1; } diff --git a/tools/pvmove_poll.c b/tools/pvmove_poll.c index f573eb93a..e50747cf4 100644 --- a/tools/pvmove_poll.c +++ b/tools/pvmove_poll.c @@ -52,7 +52,6 @@ static int _detach_pvmove_mirror(struct cmd_context *cmd, { uint32_t mimage_to_remove = 0; struct dm_list lvs_completed; - struct lv_list *lvl; /* Update metadata to remove mirror segments and break dependencies */ dm_list_init(&lvs_completed); @@ -67,10 +66,6 @@ static int _detach_pvmove_mirror(struct cmd_context *cmd, return_0; } - dm_list_iterate_items(lvl, &lvs_completed) - /* FIXME Assumes only one pvmove at a time! */ - lvl->lv->status &= ~LOCKED; - return 1; }