The parent of the mdev definition can change due to the existance of the parent device. The parents existance can e.g. depend on the device driver load state. Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx> Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx> Reviewed-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> --- src/node_device/node_device_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index 7b2fb3d953..84dde743df 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -1670,7 +1670,9 @@ removeMissingPersistentMdev(virNodeDeviceObj *obj, for (i = 0; i < data->ndefs; i++) { /* OK, this mdev is still defined by mdevctl */ - if (STREQ(data->defs[i]->name, def->name)) + /* AND the parent object has not changed */ + if (STREQ(data->defs[i]->name, def->name) && + STREQ(data->defs[i]->parent, def->parent)) return false; } -- 2.33.1