From fe245d78ff603dd798b719854ee8d900f858779d Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 30 Oct 2014 13:04:41 +0100 Subject: [PATCH] cleanup: shorter code --- lib/metadata/pool_manip.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/metadata/pool_manip.c b/lib/metadata/pool_manip.c index d1b449713..c7c07e53a 100644 --- a/lib/metadata/pool_manip.c +++ b/lib/metadata/pool_manip.c @@ -533,12 +533,11 @@ struct logical_volume *alloc_pool_metadata(struct logical_volume *pool_lv, .read_ahead = read_ahead, .stripe_size = stripe_size, .stripes = stripes, - .zero = 1, + .tags = DM_LIST_HEAD_INIT(lvc.tags), .temporary = 1, + .zero = 1, }; - dm_list_init(&lvc.tags); - if (!(lvc.extents = extents_from_size(pool_lv->vg->cmd, size, pool_lv->vg->extent_size))) return_0; @@ -574,12 +573,11 @@ static struct logical_volume *_alloc_pool_metadata_spare(struct volume_group *vg .pvh = pvh ? : &vg->pvs, .read_ahead = DM_READ_AHEAD_AUTO, .stripes = 1, - .zero = 1, + .tags = DM_LIST_HEAD_INIT(lp.tags), .temporary = 1, + .zero = 1, }; - dm_list_init(&lp.tags); - if (!(lp.segtype = get_segtype_from_string(vg->cmd, "striped"))) return_0;