drbd: destroy workqueue when drbd device was freed
authorWang ShaoBo <bobo.shaobowang@huawei.com>
Thu, 24 Nov 2022 01:58:17 +0000 (09:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:12 +0000 (13:14 +0100)
commit16437645dd970a449782ca817d9f7f8b7e52b978
tree5fe2cf2ee21ebfee0fab1be8b851ce7c28f4beaf
parentcdaf45415c1e82ad6e36e19ce9471e8611ec6f95
drbd: destroy workqueue when drbd device was freed

[ Upstream commit 8692814b77ca4228a99da8a005de0acf40af6132 ]

A submitter workqueue is dynamically allocated by init_submitter()
called by drbd_create_device(), we should destroy it when this
device is not needed or destroyed.

Fixes: 113fef9e20e0 ("drbd: prepare to queue write requests on a submit worker")
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
Link: https://lore.kernel.org/r/20221124015817.2729789-3-bobo.shaobowang@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/drbd/drbd_main.c