From d14471e44d2763c537afc82aa4043e6c28762e10 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 16 Mar 2010 19:06:57 +0000 Subject: [PATCH] fix last checkin --- lib/cache/lvmcache.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index 05e908d13..e5e5fbe18 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -605,9 +605,9 @@ struct volume_group *lvmcache_get_vg(const char *vgid, unsigned precommitted) (!precommitted && vginfo->precommitted && !memlock())) return NULL; - if (!(fid = vginfo->fmt->ops->create_instance(vginfo->fmt, - vginfo->vgname, - vgid, NULL))) + if (!(fid = vginfo->fmt->ops->create_instance(vginfo->fmt, + vginfo->vgname, + vgid, NULL))) return_NULL; if (!(vg = import_vg_from_buffer(vginfo->vgmetadata, fid)) || @@ -733,7 +733,8 @@ struct device *device_from_pvid(struct cmd_context *cmd, struct id *pvid, return NULL; lvmcache_label_scan(cmd, 2); - *scan_done_once = 1; + if (scan_done_once) + *scan_done_once = 1; /* Try again */ if ((info = info_from_pvid((char *) pvid, 0))) { -- 2.43.5