[PATCH v3 5/8] virConnectCloseCallbackDataDispose: remove unnecessary locks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We don't need locks in dispose functions as they can only
be run in one thread for given object.
---
 src/datatypes.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/datatypes.c b/src/datatypes.c
index 57162ec..29f94e8 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -183,13 +183,7 @@ void virConnectCloseCallbackDataReset(virConnectCloseCallbackDataPtr close)
 static void
 virConnectCloseCallbackDataDispose(void *obj)
 {
-    virConnectCloseCallbackDataPtr cb = obj;
-
-    virObjectLock(cb);
-
-    virConnectCloseCallbackDataReset(cb);
-
-    virObjectUnlock(cb);
+    virConnectCloseCallbackDataReset(obj);
 }
 
 int virConnectCloseCallbackDataRegister(virConnectCloseCallbackDataPtr close,
-- 
1.8.3.1

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]