]> git.proxmox.com Git - pve-guest-common.git/commitdiff
Avoid duplication by using lock_config_mode
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 5 May 2020 08:27:16 +0000 (10:27 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 5 May 2020 09:11:19 +0000 (11:11 +0200)
No functional change is intended.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/AbstractConfig.pm

index beb10c7229be427cd8e3d4801239aa99ac7948c8..f1b395c4e712a21613d3039e586fa5ccf287aede 100644 (file)
@@ -259,13 +259,7 @@ sub load_current_config {
 sub lock_config_full {
     my ($class, $vmid, $timeout, $code, @param) = @_;
 
-    my $filename = $class->config_file_lock($vmid);
-
-    my $res = lock_file($filename, $timeout, $code, @param);
-
-    die $@ if $@;
-
-    return $res;
+    return $class->lock_config_mode($vmid, $timeout, 0, $code, @param);
 }
 
 sub create_and_lock_config {