]> git.proxmox.com Git - pve-common.git/commitdiff
INotify.pm: use Clone::clone instead of Storable::dclone
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 21 Mar 2017 10:56:49 +0000 (11:56 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 21 Mar 2017 10:59:08 +0000 (11:59 +0100)
I run into seroius troubles with dclone, which seem to be
buggy with tainted flag ...

Also, documentation states Clone::clone is much faster.

src/PVE/INotify.pm

index c2055b66aea80ff47d6b2deecf084d038a676e0d..b2a580294a9195d8fb313950186a345a4f32b1c2 100644 (file)
@@ -15,7 +15,7 @@ use PVE::SafeSyslog;
 use PVE::Exception qw(raise_param_exc);
 use PVE::Tools;
 use PVE::ProcFSTools;
-use Storable qw(dclone);            
+use Clone qw(clone);
 use Linux::Inotify2;
 use base 'Exporter';
 use JSON; 
@@ -247,7 +247,7 @@ sub read_file {
 
        my $ret;
        if (!$noclone && ref ($ccinfo->{data})) {
-           $ret->{data} = dclone ($ccinfo->{data});
+           $ret->{data} = clone ($ccinfo->{data});
        } else {
            $ret->{data} = $ccinfo->{data};
        }
@@ -269,7 +269,7 @@ sub read_file {
     }
 
     # we cache data with references, so we always need to
-    # dclone this data. Else the original data may get
+    # clone this data. Else the original data may get
     # modified.
     $ccinfo->{data} = $res;
 
@@ -278,7 +278,7 @@ sub read_file {
 
     my $ret;
     if (!$noclone && ref ($ccinfo->{data})) {
-       $ret->{data} = dclone ($ccinfo->{data});
+       $ret->{data} = clone ($ccinfo->{data});
     } else {
        $ret->{data} = $ccinfo->{data};
     }