[libvirt PATCH v4 6/9] virChrdevFDStreamCloseCb: Use virLockGuardLock

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

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/virchrdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c
index b5477b03d5..c9b2134e3b 100644
--- a/src/conf/virchrdev.c
+++ b/src/conf/virchrdev.c
@@ -237,12 +237,10 @@ static void virChrdevFDStreamCloseCb(virStreamPtr st G_GNUC_UNUSED,
                                       void *opaque)
 {
     virChrdevStreamInfo *priv = opaque;
-    virMutexLock(&priv->devs->lock);
+    VIR_LOCK_GUARD lock = virLockGuardLock(&priv->devs->lock);
 
     /* remove entry from hash */
     virHashRemoveEntry(priv->devs->hash, priv->path);
-
-    virMutexUnlock(&priv->devs->lock);
 }
 
 /**
-- 
2.31.1




[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