mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
raid: remove wrong pool free
No, we cannot free pool members here.
This commit is contained in:
parent
1445d40794
commit
68ef288901
@ -266,25 +266,19 @@ static int detach_metadata_devices(struct lv_segment *seg, struct dm_list *list)
|
||||
static int attach_metadata_devices(struct lv_segment *seg, struct dm_list *list)
|
||||
{
|
||||
struct cmd_context *cmd = seg->lv->vg->cmd;
|
||||
struct lv_list *lvl, *tmp;
|
||||
struct lv_list *lvl;
|
||||
|
||||
if (seg_is_raid(seg)) {
|
||||
dm_list_iterate_items_safe(lvl, tmp, list) {
|
||||
dm_list_iterate_items(lvl, list)
|
||||
lv_set_hidden(lvl->lv);
|
||||
dm_pool_free(cmd->mem, lvl);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
dm_list_iterate_items(lvl, list)
|
||||
break; /* get first item */
|
||||
|
||||
if (!attach_mirror_log(seg, lvl->lv)) {
|
||||
dm_pool_free(cmd->mem, lvl);
|
||||
if (!attach_mirror_log(seg, lvl->lv))
|
||||
return_0;
|
||||
}
|
||||
|
||||
dm_pool_free(cmd->mem, lvl);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user