zpool: activate: drop intermediate state variable, return directly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -530,8 +530,6 @@ sub activate_storage {
|
|||||||
my $pool = ($dataset =~ s!/.*$!!r);
|
my $pool = ($dataset =~ s!/.*$!!r);
|
||||||
|
|
||||||
my $dataset_mounted = sub {
|
my $dataset_mounted = sub {
|
||||||
my $mounted = 0;
|
|
||||||
|
|
||||||
my $mounts = eval { PVE::ProcFSTools::parse_proc_mounts() };
|
my $mounts = eval { PVE::ProcFSTools::parse_proc_mounts() };
|
||||||
warn "$@\n" if $@;
|
warn "$@\n" if $@;
|
||||||
foreach my $mp (@$mounts) {
|
foreach my $mp (@$mounts) {
|
||||||
@ -541,10 +539,9 @@ sub activate_storage {
|
|||||||
# root-dataset could have 'canmount=off'. If any child is mounted
|
# root-dataset could have 'canmount=off'. If any child is mounted
|
||||||
# heuristically assume that `zfs mount -a` was successful
|
# heuristically assume that `zfs mount -a` was successful
|
||||||
next if $what !~ m!^$dataset(?:/|$)!;
|
next if $what !~ m!^$dataset(?:/|$)!;
|
||||||
$mounted = 1;
|
return 1;
|
||||||
last;
|
|
||||||
}
|
}
|
||||||
return $mounted;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
my $pool_imported = sub {
|
my $pool_imported = sub {
|
||||||
|
|||||||
Reference in New Issue
Block a user