From 34eaae3f8db0a6110fb190dbdf746e823136051d Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 22 Jan 2015 09:40:22 +0100 Subject: [PATCH] zfs: cleanup zfs_get_lu_name --- PVE/Storage/ZFSPlugin.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/PVE/Storage/ZFSPlugin.pm b/PVE/Storage/ZFSPlugin.pm index 69c6ecc..482b557 100644 --- a/PVE/Storage/ZFSPlugin.pm +++ b/PVE/Storage/ZFSPlugin.pm @@ -93,11 +93,8 @@ sub zfs_get_lu_name { my $object; my $base = $zfs_get_base->($scfg); - if ($zvol =~ /^.+\/.+/) { - $object = "$base/$zvol"; - } else { - $object = "$base/$scfg->{pool}/$zvol"; - } + + my $object = ($zvol =~ /^.+\/.+/) ? "$base/$zvol" : "$base/$scfg->{pool}/$zvol"; my $lu_name = $class->zfs_request($scfg, undef, 'list_lu', $object);