nbd: refactor device removal
authorChristoph Hellwig <hch@lst.de>
Wed, 11 Aug 2021 12:44:24 +0000 (14:44 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Aug 2021 20:17:32 +0000 (14:17 -0600)
commit3f74e0645c52a08f640380c9c46f9a3a172b9389
treef1dfdd32e0f83a749aa7bfe2d0a90c323ffa2af0
parent68c9417b193d0d174b0ada013602272177e61303
nbd: refactor device removal

Share common code for the synchronous and workqueue based device removal,
and remove the pointless use of refcount_dec_and_mutex_lock.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210811124428.2368491-3-hch@lst.de
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c