mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
cleanup: move declaration to the front
This commit is contained in:
parent
50e1fad86a
commit
6c787d9b6e
@ -791,7 +791,7 @@ static response pv_gone(lvmetad_state *s, request r)
|
|||||||
const char *pvid = daemon_request_str(r, "uuid", NULL);
|
const char *pvid = daemon_request_str(r, "uuid", NULL);
|
||||||
int64_t device = daemon_request_int(r, "device", 0);
|
int64_t device = daemon_request_int(r, "device", 0);
|
||||||
struct dm_config_tree *pvmeta;
|
struct dm_config_tree *pvmeta;
|
||||||
char *pvid_old;
|
char *pvid_old, *vgid;
|
||||||
|
|
||||||
DEBUGLOG(s, "pv_gone: %s / %" PRIu64, pvid, device);
|
DEBUGLOG(s, "pv_gone: %s / %" PRIu64, pvid, device);
|
||||||
|
|
||||||
@ -807,7 +807,7 @@ static response pv_gone(lvmetad_state *s, request r)
|
|||||||
|
|
||||||
pvmeta = dm_hash_lookup(s->pvid_to_pvmeta, pvid);
|
pvmeta = dm_hash_lookup(s->pvid_to_pvmeta, pvid);
|
||||||
pvid_old = dm_hash_lookup_binary(s->device_to_pvid, &device, sizeof(device));
|
pvid_old = dm_hash_lookup_binary(s->device_to_pvid, &device, sizeof(device));
|
||||||
char *vgid = dm_hash_lookup(s->pvid_to_vgid, pvid);
|
vgid = dm_hash_lookup(s->pvid_to_vgid, pvid);
|
||||||
|
|
||||||
if (vgid && !(vgid = dm_strdup(vgid))) {
|
if (vgid && !(vgid = dm_strdup(vgid))) {
|
||||||
unlock_pvid_to_pvmeta(s);
|
unlock_pvid_to_pvmeta(s);
|
||||||
|
Loading…
Reference in New Issue
Block a user