From: Alasdair Kergon Date: Tue, 6 Jul 2010 20:09:38 +0000 (+0000) Subject: fix code in 2nd mda unignore loop to match 1st loop X-Git-Tag: v2_02_91~1718 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=6c8655ce9b40cf966dc47c76ed41475536d3a04a;p=lvm2.git fix code in 2nd mda unignore loop to match 1st loop --- diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index 17f0715f0..f076b721b 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -1133,8 +1133,8 @@ static int _vg_unignore_mdas(struct volume_group *vg, uint32_t num_to_unignore) } dm_list_iterate_items(mda, &vg->fid->metadata_areas_in_use) - if (mda_is_ignored(mda) && - dm_bit(mda_to_unignore_bs, num_to_unignore - 1)) { + if (mda_is_ignored(mda) && (--mda_free_count, + dm_bit(mda_to_unignore_bs, mda_free_count))) { mda_set_ignored(mda, 0); if (!--num_to_unignore) goto out;