projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e544541
)
nbd: cleanup workqueue on error properly
author
Josef Bacik
<jbacik@fb.com>
Wed, 15 Feb 2017 21:49:48 +0000
(16:49 -0500)
committer
Jens Axboe
<axboe@fb.com>
Tue, 21 Feb 2017 19:51:54 +0000
(12:51 -0700)
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>
drivers/block/nbd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/block/nbd.c
b/drivers/block/nbd.c
index cdbeb309a1051ceed84eb5b99dc4132d7f74a81b..0bf2b21a62cb770a3129889b59a0b5f735eddc52 100644
(file)
--- a/
drivers/block/nbd.c
+++ b/
drivers/block/nbd.c
@@
-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();