5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-02-09 09:57:38 +03:00

zfs: list images: don't use cache

There is no caller using $cache and the same $storeid multiple times,
so there is no need to keep the cache.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2022-12-20 14:16:37 +01:00 committed by Fabian Grünbichler
parent c2e6a90d4f
commit 4470f0cbe9

View File

@ -254,12 +254,11 @@ sub free_image {
sub list_images { sub list_images {
my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_; my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
$cache->{zfs}->{$storeid} = $class->zfs_list_zvol($scfg) my $zfs_list = $class->zfs_list_zvol($scfg);
if !$cache->{zfs}->{$storeid};
my $res = []; my $res = [];
if (my $dat = $cache->{zfs}->{$storeid}) { if (my $dat = $zfs_list) {
foreach my $image (keys %$dat) { foreach my $image (keys %$dat) {