summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-06-21 13:43:55 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2012-06-22 13:50:21 +0200
commite9f9c6be26bb9c40269ebad6250e1a5b4759e74f (patch)
treee570dc500e030926071ff7b32c869a21bf23b8c8 /lib
parent2539769356cd73ffe6ff7abd9f9c3208ff24ee8b (diff)
downloadlvm2-e9f9c6be26bb9c40269ebad6250e1a5b4759e74f.tar.gz
lvm2-e9f9c6be26bb9c40269ebad6250e1a5b4759e74f.tar.xz
lvm2-e9f9c6be26bb9c40269ebad6250e1a5b4759e74f.zip
lvmetad: check for fid existance
Fail to update lvmetad with proper log error message.
Diffstat (limited to 'lib')
-rw-r--r--lib/cache/lvmetad.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index 291adfab..d70e4905 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -691,6 +691,9 @@ int pvscan_lvmetad_single(struct cmd_context *cmd, struct device *dev)
baton.fid = lvmcache_fmt(info)->ops->create_instance(lvmcache_fmt(info),
&fic);
+ if (!baton.fid)
+ goto_bad;
+
lvmcache_foreach_mda(info, _pvscan_lvmetad_single, &baton);
if (!baton.vg)
lvmcache_fmt(info)->ops->destroy_instance(baton.fid);