[libvirt] [PATCH 11/15] nodedev: Keep the node device lock longer in nodeDeviceDestroy
Pavel Hrdina
phrdina at redhat.com
Sat Feb 18 16:26:54 UTC 2017
On Wed, Jan 25, 2017 at 03:27:37PM -0500, John Ferlan wrote:
> While perhaps improbable, it could be possible that after finding our
> object that another thread running essentially in parallel could attempt
> to delete the same vHBA.
>
> So rather than dropping the lock right after finding the object, keep
> the lock around while we drop the object lock and work on deleting the
> object. Once the delete occurs we can safely drop the driver lock again.
>
> Cleanup some of the usage of cleanup instead out for the goto label.
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
> src/node_device/node_device_driver.c | 22 ++++++++++------------
> 1 file changed, 10 insertions(+), 12 deletions(-)
ACK
Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170218/1c4e3e66/attachment-0001.sig>
More information about the libvir-list
mailing list