Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
On 4/12/24 15:36, Marc Hartmayer wrote:
There is no reason to serialize the `mdevctl list` calls.
Signed-off-by: Marc Hartmayer <mhartmay(a)linux.ibm.com>
---
src/node_device/node_device_udev.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 9282afdd3241..77c35f981b66 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -70,8 +70,7 @@ struct _udevEventData {
bool udevThreadQuit;
bool udevDataReady;
- /* Protects @mdevctlMonitors and must be taken when `mdevctl` command is
- * called to make sure only one thread can query mdevctl at a time. */
+ /* Protects @mdevctlMonitors */
virMutex mdevctlLock;
GList *mdevctlMonitors;
int mdevctlTimeout;
@@ -2318,10 +2317,6 @@ static void nodeDeviceEventHandler(void *data, void *opaque)
break;
case NODE_DEVICE_EVENT_UPDATE:
{
- udevEventData *priv = driver_state->privateData;
- /* ensure only a single thread can query mdevctl at a time */
- VIR_LOCK_GUARD lock = virLockGuardLock(&priv->mdevctlLock);
-
if (nodeDeviceUpdateMediatedDevices(driver_state) < 0)
VIR_WARN("mdevctl failed to update mediated devices");
}
--
Mit freundlichen Grüßen/Kind regards
Boris Fiuczynski
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294