[libvirt] [PATCH] test: Remove unnecessary unlocks in cleanup paths

John Ferlan posted 1 patch 6 years, 12 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20170424175342.22156-1-jferlan@redhat.com
src/test/test_driver.c | 5 -----
1 file changed, 5 deletions(-)
[libvirt] [PATCH] test: Remove unnecessary unlocks in cleanup paths
Posted by John Ferlan 6 years, 12 months ago
Commit id '865f479da' altered the logic to use a common test*ObjFindByName
helpers which would lock/unlock the test driver; however, a few cleanup paths
in that cleanup missed removing the Unlock, so remove it now.

Signed-off-by: John Ferlan <jferlan@redhat.com>
---
 src/test/test_driver.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 00999b1..2db3f7d 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -3931,7 +3931,6 @@ testInterfaceUndefine(virInterfacePtr iface)
     ret = 0;
 
  cleanup:
-    testDriverUnlock(privconn);
     return ret;
 }
 
@@ -3960,7 +3959,6 @@ testInterfaceCreate(virInterfacePtr iface,
  cleanup:
     if (privinterface)
         virInterfaceObjUnlock(privinterface);
-    testDriverUnlock(privconn);
     return ret;
 }
 
@@ -3989,7 +3987,6 @@ testInterfaceDestroy(virInterfacePtr iface,
  cleanup:
     if (privinterface)
         virInterfaceObjUnlock(privinterface);
-    testDriverUnlock(privconn);
     return ret;
 }
 
@@ -4480,7 +4477,6 @@ testStoragePoolUndefine(virStoragePoolPtr pool)
     if (privpool)
         virStoragePoolObjUnlock(privpool);
     testObjectEventQueue(privconn, event);
-    testDriverUnlock(privconn);
     return ret;
 }
 
@@ -4591,7 +4587,6 @@ testStoragePoolDestroy(virStoragePoolPtr pool)
     testObjectEventQueue(privconn, event);
     if (privpool)
         virStoragePoolObjUnlock(privpool);
-    testDriverUnlock(privconn);
     return ret;
 }
 
-- 
2.9.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] test: Remove unnecessary unlocks in cleanup paths
Posted by Michal Privoznik 6 years, 12 months ago
On 04/24/2017 07:53 PM, John Ferlan wrote:
> Commit id '865f479da' altered the logic to use a common test*ObjFindByName
> helpers which would lock/unlock the test driver; however, a few cleanup paths
> in that cleanup missed removing the Unlock, so remove it now.
>
> Signed-off-by: John Ferlan <jferlan@redhat.com>
> ---
>  src/test/test_driver.c | 5 -----
>  1 file changed, 5 deletions(-)

Oops. ACK

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list