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

lvconvert_poll: ensure LV has snapshot type

LV may not be a snapshot type, the return value of find_snapshot(lv) may be NULL.
Here, we will call stack if LV is not a snapshot type.

Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
This commit is contained in:
Wu Guanghao 2020-09-11 17:41:01 +08:00 committed by Zdenek Kabelac
parent d71199920f
commit 223b75ee91

View File

@ -176,7 +176,7 @@ progress_t poll_thin_merge_progress(struct cmd_context *cmd,
{
uint32_t device_id;
if (!lv_thin_device_id(lv, &device_id)) {
if (!lv_thin_device_id(lv, &device_id) && !lv_is_snapshot(lv)) {
stack;
return PROGRESS_CHECK_FAILED;
}