]> git.baikalelectronics.ru Git - kernel.git/commit
nbd: add missing locking to the nbd_dev_add error path
authorTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Wed, 25 Aug 2021 16:31:03 +0000 (18:31 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 25 Aug 2021 20:20:08 +0000 (14:20 -0600)
commita62aa351a41a1bcd1a9a330672cafbf9c84b438e
treec6415a1cd974836f8c23c637d571249749500930
parent4df030306154db2b4efe249c875bc74141a19681
nbd: add missing locking to the nbd_dev_add error path

idr_remove needs external synchronization.

Fixes: 8e99b495d2dd ("nbd: reduce the nbd_index_mutex scope")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
[hch: split from a larger patch]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210825163108.50713-2-hch@lst.de
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c