]> xenbits.xensource.com Git - libvirt.git/commitdiff
virStorageSourceChainHasManagedPR: Check propely
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 21 Jun 2019 16:01:38 +0000 (18:01 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 21 Jun 2019 16:04:11 +0000 (18:04 +0200)
In the virStorageSourceChainHasManagedPR() function we iterate
over whole backing chain trying to determine if one of the layers
has managed PR configured. But due to a typo we in fact check the
top layer only.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virstoragefile.c

index 2b1c0a5b8e21a0c6f9dd9c7de52c6020d5e6dee6..f7495ab6da1234f332f4a113421c4b20fcdcf4fb 100644 (file)
@@ -2083,7 +2083,7 @@ virStorageSourceChainHasManagedPR(virStorageSourcePtr src)
     virStorageSourcePtr n;
 
     for (n = src; virStorageSourceIsBacking(n); n = n->backingStore) {
-        if (virStoragePRDefIsManaged(src->pr))
+        if (virStoragePRDefIsManaged(n->pr))
             return true;
     }