summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2018-10-15 16:29:09 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2018-10-15 17:49:44 +0200
commitb57e73a0f1376ea114451c0172f0ef0adbd3123f (patch)
tree8f874104bd1eec8087b810561f13386519bb8319
parent70950bbd977020593b19ac704fd7571b4b2826cd (diff)
downloadlvm2-b57e73a0f1376ea114451c0172f0ef0adbd3123f.tar.gz
cov: make sure label scans valid lvinfo
-rw-r--r--lib/label/label.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/label/label.c b/lib/label/label.c
index 9fe11f635..3901a860e 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -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);