1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-25 21:57:45 +03:00

Update vgcreate to use new vg_lock_newname().

This commit is contained in:
Dave Wysochanski 2009-06-09 14:30:44 +00:00
parent f3a56d49e3
commit 285375e6c3

View File

@ -51,7 +51,7 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
return ECMD_FAILED;
}
if (!lock_vol(cmd, vp_new.vg_name, LCK_VG_WRITE)) {
if (vg_lock_newname(cmd, vp_new.vg_name) != SUCCESS) {
log_error("Can't get lock for %s", vp_new.vg_name);
unlock_vg(cmd, VG_ORPHANS);
return ECMD_FAILED;