Commit 6330a2d0 authored by Josef Bacik's avatar Josef Bacik Committed by Jens Axboe
Browse files

nbd: cleanup workqueue on error properly

If we fail to register the blockdev we need to make sure to destroy the
recv workqueue.
Signed-off-by: default avatarJosef Bacik <>
Signed-off-by: default avatarJens Axboe <>
parent e544541b
......@@ -1121,8 +1121,10 @@ static int __init nbd_init(void)
if (!recv_workqueue)
return -ENOMEM;
if (register_blkdev(NBD_MAJOR, "nbd"))
if (register_blkdev(NBD_MAJOR, "nbd")) {
return -EIO;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment