Re: [PATCH 06/13] Turn virDomainObjPtr into a virObjectPtr

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

 



On Wed, Aug 01, 2012 at 04:39:24PM +0800, Hu Tao wrote:
> >  void
> >  virBlkioDeviceWeightArrayClear(virBlkioDeviceWeightPtr deviceWeights,
> >                                 int ndevices)
> > @@ -723,7 +738,7 @@ virDomainObjListDataFree(void *payload, const void *name ATTRIBUTE_UNUSED)
> >  {
> >      virDomainObjPtr obj = payload;
> >      virDomainObjLock(obj);
> > -    if (virDomainObjUnref(obj) > 0)
> > +    if (!virObjectUnref(obj))
> >          virDomainObjUnlock(obj);
> >  }
> 
> I suppose you mean
> 
>        if (virObjectUnref(obj))
> 
> here.
> 
> But, I can't see any reason to lock then unref then unlock, just unref
> is enough.

I didn't want to change multiple things at the same time. Simplification
of locking in various places can follow later.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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