[libvirt] [PATCH] virStorageSourceChainHasManagedPR: Check propely

Michal Privoznik mprivozn at redhat.com
Fri Jun 21 16:11:59 UTC 2019


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 at redhat.com>
---

Pushed under trivial rule.

 src/util/virstoragefile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 2b1c0a5b8e..f7495ab6da 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -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;
     }
 
-- 
2.21.0




More information about the libvir-list mailing list