Using comments from recent changes/reviews w/ libxl and usage of
the virDomainObjListRemove which note that it's "a problem" that
the Remove API expects a locked @obj on input, but then returns
the @obj unlocked.
Although adjusting domainobjlist is a "future" task, we can at least
modify the other drivers/vir*obj modules to be consistent at least
with respect to expecting and returning a locked (and reffed) object.
Thus, modify interface, secret, nodedev, and storage pool. The network
is already done this way and nwfilter appears to be a lost cause as
we cannot come to a concensus over how to use hash objects and thus
the code still uses forward linked list object manipulation.
Changes for virdomainobjlist require a number of other changes to
happen first with respect to consistent usage of Find and Add API's
to return locked and ref counted objects, then being able to have
the virDomainObjListRemove be consistent as well.
John Ferlan (4):
secret: Return with locked obj from virSecretObjListRemove
interface: Return with locked obj from virInterfaceObjListRemove
nodedev: Return with locked obj from virNodeDeviceObjListRemove
storagepool: Return with locked obj from virStoragePoolObjRemove
src/conf/virinterfaceobj.c | 13 ++++++++++++-
src/conf/virnodedeviceobj.c | 13 ++++++++++++-
src/conf/virsecretobj.c | 15 ++++++++-------
src/conf/virstorageobj.c | 17 ++++++++++++++---
src/node_device/node_device_hal.c | 4 ++--
src/node_device/node_device_udev.c | 2 +-
src/secret/secret_driver.c | 4 ----
src/storage/storage_driver.c | 12 +-----------
src/test/test_driver.c | 20 +++++---------------
9 files changed, 55 insertions(+), 45 deletions(-)
--
2.13.6