Thread (11 messages) flat view 11 messages, 4 authors, 2021-08-13

Re: [PATCH 6/6] nbd: reduce the nbd_index_mutex scope

From: Eric Blake <hidden>
Date: 2021-08-11 15:57:21

On Wed, Aug 11, 2021 at 02:44:28PM +0200, Christoph Hellwig wrote:
nbd_index_mutex is currently held over add_disk and inside ->open, which
leads to lock order reversals.  Refactor the device creation code path
so that nbd_dev_add is called without nbd_index_mutex lock held and
only takes it for the IDR insertation.
insertion
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/block/nbd.c | 55 +++++++++++++++++++++++----------------------
 1 file changed, 28 insertions(+), 27 deletions(-)
-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help