1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

virStorageVolObjEndAPI: Remove

This allows a later patch to replace virObjectLock/Unlock
pairs with automatic mutex management code.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Tim Wiederhake 2022-04-11 13:36:44 +02:00
parent 8283450370
commit d12417de63

View File

@ -138,17 +138,6 @@ virStorageVolObjNew(void)
}
static void
virStorageVolObjEndAPI(virStorageVolObj **obj)
{
if (!*obj)
return;
virObjectUnlock(*obj);
g_clear_pointer(obj, virObjectUnref);
}
static void
virStorageVolObjDispose(void *opaque)
{
@ -660,7 +649,8 @@ virStoragePoolObjAddVol(virStoragePoolObj *obj,
volobj->voldef = voldef;
virStorageVolObjEndAPI(&volobj);
virObjectUnlock(volobj);
virObjectUnref(volobj);
virObjectRWUnlock(volumes);
return 0;
}
@ -689,8 +679,8 @@ virStoragePoolObjRemoveVol(virStoragePoolObj *obj,
g_hash_table_remove(volumes->objsKey, voldef->key);
g_hash_table_remove(volumes->objsName, voldef->name);
g_hash_table_remove(volumes->objsPath, voldef->target.path);
virStorageVolObjEndAPI(&volobj);
virObjectUnlock(volobj);
virObjectUnref(volobj);
virObjectRWUnlock(volumes);
}