[libvirt] [PATCH 5/5] Turn nwfilter conf update mutex into a read/write lock
Stefan Berger
stefanb at linux.vnet.ibm.com
Thu Jan 23 19:46:42 UTC 2014
On 01/23/2014 07:37 AM, Daniel P. Berrange wrote:
>
> @@ -3477,7 +3482,7 @@ int virNWFilterConfLayerInit(virDomainObjListIterator domUpdateCB,
>
> initialized = true;
>
> - if (virMutexInitRecursive(&updateMutex) < 0)
> + if (virRWLockInit(&updateLock) < 0)
> return -1;
>
Obviously it was a recursive lock before. Now pthread_rwlock_wrlock()
must not be called twice by the same thread. I am fine with the
conversion below per se. The functions below are quite low-level now
(close to virsh) that they are not called recursively. So from this
perspective for this patch:
ACK
More information about the libvir-list
mailing list