5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-01-24 02:04:13 +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 {
my ($class, $storeid, $scfg, $vmid, $vollist, $cache) = @_;
$cache->{zfs}->{$storeid} = $class->zfs_list_zvol($scfg)
if !$cache->{zfs}->{$storeid};
my $zfs_list = $class->zfs_list_zvol($scfg);
my $res = [];
if (my $dat = $cache->{zfs}->{$storeid}) {
if (my $dat = $zfs_list) {
foreach my $image (keys %$dat) {