1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

clang: check segment lv is defined

This commit is contained in:
Zdenek Kabelac 2024-10-25 00:14:09 +02:00
parent 5ec8f744d0
commit 0fbcb3b308
2 changed files with 2 additions and 2 deletions

View File

@ -1581,7 +1581,7 @@ static int _lv_reduce(struct logical_volume *lv, uint32_t extents, int delete)
return_0;
}
if (seg_is_thin_pool(seg)) {
if (seg_is_thin_pool(seg) && seg_lv(seg, 0)) {
/* For some segtypes the size may differ between the segment size and its layered LV
* i.e. thin-pool and tdata.
*

View File

@ -632,7 +632,7 @@ int check_lv_segments_complete_vg(struct logical_volume *lv)
}
if (seg_is_mirrored(seg) && !seg_is_raid(seg) &&
seg_type(seg, s) == AREA_LV &&
seg_type(seg, s) == AREA_LV && seg_lv(seg, s) &&
seg_lv(seg, s)->le_count != seg->area_len) {
log_error("LV %s: mirrored LV segment %u has "
"wrong size %u (should be %u).",