1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

thin: fix test for nonexisting status

Check status has right type.
This commit is contained in:
Zdenek Kabelac 2016-02-18 18:09:49 +01:00
parent bcf7f80791
commit 42b394c142

View File

@ -3317,7 +3317,7 @@ static int _lvcheckneeded_disp(struct dm_report *rh, struct dm_pool *mem,
{ {
const struct lv_with_info_and_seg_status *lvdm = (const struct lv_with_info_and_seg_status *) data; const struct lv_with_info_and_seg_status *lvdm = (const struct lv_with_info_and_seg_status *) data;
if (lv_is_thin_pool(lvdm->lv)) if (lv_is_thin_pool(lvdm->lv) && lvdm->seg_status.type == SEG_STATUS_THIN_POOL)
return _binary_disp(rh, mem, field, lvdm->seg_status.thin_pool->needs_check, return _binary_disp(rh, mem, field, lvdm->seg_status.thin_pool->needs_check,
GET_FIRST_RESERVED_NAME(lv_check_needed_y), private); GET_FIRST_RESERVED_NAME(lv_check_needed_y), private);