summaryrefslogtreecommitdiffstats
path: root/block/ll_rw_blk.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r--block/ll_rw_blk.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index ef42bb2b12b6..3795e0708a22 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -4091,6 +4091,13 @@ int blk_register_queue(struct gendisk *disk)
return ret;
}
+ ret = bsg_register_disk(disk);
+ if (ret) {
+ elv_unregister_queue(q);
+ kobject_unregister(&q->kobj);
+ return ret;
+ }
+
return 0;
}
@@ -4099,6 +4106,7 @@ void blk_unregister_queue(struct gendisk *disk)
request_queue_t *q = disk->queue;
if (q && q->request_fn) {
+ bsg_unregister_disk(disk);
elv_unregister_queue(q);
kobject_uevent(&q->kobj, KOBJ_REMOVE);
OpenPOWER on IntegriCloud