1
0
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:
Zdenek Kabelac 2013-04-23 14:06:40 +02:00
parent 1445d40794
commit 68ef288901

View File

@ -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;
}