]> git.proxmox.com Git - pve-storage.git/commitdiff
cephfs: fix variable declared in conditional statement
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 15:15:41 +0000 (17:15 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 15:15:41 +0000 (17:15 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Storage/CephFSPlugin.pm

index 79106cc808a36ef2915ef94245a10ea896986b23..db0c2f6b18e192394b75db000c1f35c4103e3bab 100644 (file)
@@ -170,8 +170,7 @@ sub check_config {
 sub on_add_hook {
     my ($class, $storeid, $scfg, %param) = @_;
 
-    my $secret = $param{keyring} if defined $param{keyring} // undef;
-    PVE::CephConfig::ceph_create_keyfile($scfg->{type}, $storeid, $secret);
+    PVE::CephConfig::ceph_create_keyfile($scfg->{type}, $storeid, $param{keyring});
 
     return;
 }