Christoph Hellwig 6e4df4c648 nbd: reduce the nbd_index_mutex scope
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.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210811124428.2368491-7-hch@lst.de
[axboe: fix whitespace]
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-08-13 14:17:41 -06:00
..
2021-06-30 12:21:16 -07:00
2021-06-30 12:21:16 -07:00
2021-06-30 12:21:16 -07:00
2021-06-30 12:21:16 -07:00
2021-08-02 13:37:29 -06:00
2021-06-29 10:53:50 -07:00
2021-03-24 06:57:40 -06:00
2021-06-01 07:42:24 -06:00
2021-08-13 14:17:41 -06:00
2021-06-30 15:34:19 -06:00
2021-08-02 13:37:27 -06:00
2021-08-02 13:37:27 -06:00
2021-06-11 11:53:02 -06:00
2021-06-11 11:53:03 -06:00
2021-06-30 12:21:16 -07:00
2021-06-30 12:21:16 -07:00