diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2011-08-10 20:25:29 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2011-08-10 20:25:29 +0000 |
commit | 077a6755ff2ac55c334870fb47d18fb397904dc3 (patch) | |
tree | 07d328232a75d6df52bf13332d2e3b64c018aa0e /tools/vgrename.c | |
parent | 789f9c55e5a526ee3ded3f95bfce3ce836bc3dd2 (diff) | |
download | lvm2-077a6755ff2ac55c334870fb47d18fb397904dc3.tar.gz lvm2-077a6755ff2ac55c334870fb47d18fb397904dc3.tar.xz lvm2-077a6755ff2ac55c334870fb47d18fb397904dc3.zip |
Replace free_vg with release_vg
Move the free_vg() to vg.c and replace free_vg with release_vg
and make the _free_vg internal.
Patch is needed for sharing VG in vginfo cache so the release_vg function name
is a better fit here.
Diffstat (limited to 'tools/vgrename.c')
-rw-r--r-- | tools/vgrename.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/vgrename.c b/tools/vgrename.c index 2f83fc63..1f1f9434 100644 --- a/tools/vgrename.c +++ b/tools/vgrename.c @@ -25,7 +25,7 @@ static struct volume_group *_get_old_vg_for_rename(struct cmd_context *cmd, nevertheless. */ vg = vg_read_for_update(cmd, vg_name_old, vgid, READ_ALLOW_EXPORTED); if (vg_read_error(vg)) { - free_vg(vg); + release_vg(vg); return_NULL; } @@ -117,7 +117,7 @@ static int vg_rename_path(struct cmd_context *cmd, const char *old_vg_path, return_0; if (!_lock_new_vg_for_rename(cmd, vg_name_new)) { - unlock_and_free_vg(cmd, vg, vg_name_old); + unlock_and_release_vg(cmd, vg, vg_name_old); return_0; } } else { @@ -170,7 +170,7 @@ static int vg_rename_path(struct cmd_context *cmd, const char *old_vg_path, stack; unlock_vg(cmd, vg_name_new); - unlock_and_free_vg(cmd, vg, vg_name_old); + unlock_and_release_vg(cmd, vg, vg_name_old); log_print("Volume group \"%s\" successfully renamed to \"%s\"", vg_name_old, vg_name_new); @@ -184,9 +184,9 @@ static int vg_rename_path(struct cmd_context *cmd, const char *old_vg_path, error: if (lock_vg_old_first) { unlock_vg(cmd, vg_name_new); - unlock_and_free_vg(cmd, vg, vg_name_old); + unlock_and_release_vg(cmd, vg, vg_name_old); } else { - unlock_and_free_vg(cmd, vg, vg_name_old); + unlock_and_release_vg(cmd, vg, vg_name_old); unlock_vg(cmd, vg_name_new); } return 0; |