[PATCH v2 8/9] conf: Move virStoragePoolObjRemove closer to AssignDef

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

 



A subsequent patch will need to use the local FindByUUIDLocked,
so rather than create a forward decl or move when needed, let's
just do it now for ease of future review.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/virstorageobj.c | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index 471262f29..f48f08a64 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -517,25 +517,6 @@ virStoragePoolObjListSearch(virStoragePoolObjListPtr pools,
 }
 
 
-void
-virStoragePoolObjRemove(virStoragePoolObjListPtr pools,
-                        virStoragePoolObjPtr obj)
-{
-    char uuidstr[VIR_UUID_STRING_BUFLEN];
-
-    virUUIDFormat(obj->def->uuid, uuidstr);
-    virObjectRef(obj);
-    virObjectUnlock(obj);
-    virObjectRWLockWrite(pools);
-    virObjectLock(obj);
-    virHashRemoveEntry(pools->objs, uuidstr);
-    virHashRemoveEntry(pools->objsName, obj->def->name);
-    virObjectUnlock(obj);
-    virObjectUnref(obj);
-    virObjectRWUnlock(pools);
-}
-
-
 static virStoragePoolObjPtr
 virStoragePoolObjFindByUUIDLocked(virStoragePoolObjListPtr pools,
                                   const unsigned char *uuid)
@@ -1053,6 +1034,25 @@ virStoragePoolObjVolumeListExport(virConnectPtr conn,
 }
 
 
+void
+virStoragePoolObjRemove(virStoragePoolObjListPtr pools,
+                        virStoragePoolObjPtr obj)
+{
+    char uuidstr[VIR_UUID_STRING_BUFLEN];
+
+    virUUIDFormat(obj->def->uuid, uuidstr);
+    virObjectRef(obj);
+    virObjectUnlock(obj);
+    virObjectRWLockWrite(pools);
+    virObjectLock(obj);
+    virHashRemoveEntry(pools->objs, uuidstr);
+    virHashRemoveEntry(pools->objsName, obj->def->name);
+    virObjectUnlock(obj);
+    virObjectUnref(obj);
+    virObjectRWUnlock(pools);
+}
+
+
 /**
  * virStoragePoolObjAssignDef:
  * @pools: Storage Pool object list pointer
-- 
2.13.6

--
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]

  Powered by Linux