[pve-devel] applied: [PATCH container] backup: code cleanup: remove unused variable

Fiona Ebner f.ebner at proxmox.com
Thu Feb 6 11:01:43 CET 2025


Before commit 2e57a9f ("vzdump: replace diskinfo with disks array")
the variable was used and while the commit did change the assignment
of the variable, the variable is actually unused since then.

Note that '$default_mount_point' is the mountpoint of the first disk
in the '$disks' array, so the separate variable is not needed.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 src/PVE/VZDump/LXC.pm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index 1928548..9029387 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -487,7 +487,6 @@ sub cleanup {
     my $conf = PVE::LXC::Config->load_config($vmid);
 
     if ($task->{mode} ne 'suspend') {
-	my $rootdir = $default_mount_point;
 	my $disks = $task->{disks};
 	foreach my $disk (reverse @$disks) {
 	    PVE::Tools::run_command(['umount', '-l', '-d', $disk->{dir}]) if $disk->{dir};
-- 
2.39.5





More information about the pve-devel mailing list