From: Thomas Lamprecht Date: Fri, 27 Nov 2020 09:45:06 +0000 (+0100) Subject: nfs: code cleanup X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=74dcca3a4884998c36c24aa59c9f2bd3134ba8fb;p=pve-storage.git nfs: code cleanup Signed-off-by: Thomas Lamprecht --- diff --git a/PVE/Storage/NFSPlugin.pm b/PVE/Storage/NFSPlugin.pm index c94fb91..f8d7e68 100644 --- a/PVE/Storage/NFSPlugin.pm +++ b/PVE/Storage/NFSPlugin.pm @@ -127,11 +127,8 @@ sub activate_storage { my $server = $scfg->{server}; my $export = $scfg->{export}; - if (!nfs_is_mounted($server, $export, $path, $cache->{mountdata})) { - - # NOTE: only call mkpath when not mounted (avoid hang - # when NFS server is offline - + if (!nfs_is_mounted($server, $export, $path, $cache->{mountdata})) { + # NOTE: only call mkpath when not mounted (avoid hang when NFS server is offline mkpath $path if !(defined($scfg->{mkdir}) && !$scfg->{mkdir}); die "unable to activate storage '$storeid' - " .