diff --git a/WHATS_NEW b/WHATS_NEW index 0719f065a..08ebdf5e4 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.87 - =============================== + Remove unused inconsistent_seqno variable in _vg_read(). Remove meaningless const type qualifiers on cast type. Fix memory leak in dmsetup _message() memory allocation error path. Add test for fcntl error in singlenode client code. diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index f720fd5c0..c8442d848 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -2835,7 +2835,6 @@ static struct volume_group *_vg_read(struct cmd_context *cmd, int inconsistent = 0; int inconsistent_vgid = 0; int inconsistent_pvs = 0; - int inconsistent_seqno = 0; int inconsistent_mdas = 0; int inconsistent_mda_count = 0; unsigned use_precommitted = precommitted; @@ -2931,10 +2930,9 @@ static struct volume_group *_vg_read(struct cmd_context *cmd, log_very_verbose("Not repairing VG %s metadata seqno (%d != %d) " "as global/metadata_read_only is set.", vgname, vg->seqno, correct_vg->seqno); - else { + else inconsistent = 1; - inconsistent_seqno = 1; - } + if (vg->seqno > correct_vg->seqno) { free_vg(correct_vg); correct_vg = vg; @@ -3100,10 +3098,9 @@ static struct volume_group *_vg_read(struct cmd_context *cmd, log_very_verbose("Not repairing VG %s metadata seqno (%d != %d) " "as global/metadata_read_only is set.", vgname, vg->seqno, correct_vg->seqno); - else { + else inconsistent = 1; - inconsistent_seqno = 1; - } + if (!_update_pv_list(cmd->mem, &all_pvs, vg)) { _free_pv_list(&all_pvs); free_vg(vg);