You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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: Josef Bacik <jbacik@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
+3
-1
@@ -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")) {
|
||||
destroy_workqueue(recv_workqueue);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
nbd_dbg_init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user