On Thu, Jul 20, 2017 at 10:08:15AM -0400, John Ferlan wrote:
Since virnodedeviceobj now has a self-lockable hash table,
there's no
need to lock the table from the driver for processing. Thus remove the
locks from the driver for NodeDeviceObjList mgmt.
This includes the test driver as well.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
...
/* Populate with known devices */
^This comment should come after the unlock, so it's 100% clear it's linked to
the udevEnumerateDevices call.
-
+ nodeDeviceUnlock();
if (udevEnumerateDevices(udev) != 0)
goto cleanup;
- ret = 0;
+ return 0;
cleanup:
nodeDeviceUnlock();
-
- if (ret == -1)
- nodeStateCleanup();
- return ret;
+ nodeStateCleanup();
+ return -1;
}
The patch is straightforward, if there is a spot where you forgot to handle the
locks in a similar manner and I missed it, either I will hit it with my
follow-up "mdev nodedev-list kernel race" series or someone else eventually
will :).
ACK to 1,2 and this one, I had some comments to 3, but ACK'd it in principle.
Erik