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

cov: make sure label scans valid lvinfo

This commit is contained in:
Zdenek Kabelac 2018-10-15 16:29:09 +02:00
parent 70950bbd97
commit b57e73a0f1

View File

@ -970,7 +970,9 @@ void label_scan_invalidate_lv(struct cmd_context *cmd, struct logical_volume *lv
struct device *dev;
dev_t devt;
lv_info(cmd, lv, 0, &lvinfo, 0, 0);
if (!lv_info(cmd, lv, 0, &lvinfo, 0, 0))
return;
devt = MKDEV(lvinfo.major, lvinfo.minor);
if ((dev = dev_cache_get_by_devt(cmd, devt, NULL)))
label_scan_invalidate(dev);