Message ID | a1688be84c82d71a04e9a0cb0b9c38e02fd921a3.1490742717.git.osandov@fb.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 833fb7f9ce9d..45854266e398 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -795,7 +795,6 @@ static void blk_release_queue(struct kobject *kobj) struct request_queue *q = container_of(kobj, struct request_queue, kobj); - wbt_exit(q); if (test_bit(QUEUE_FLAG_POLL_STATS, &q->queue_flags)) blk_stat_remove_callback(q, q->poll_cb); blk_stat_free_callback(q->poll_cb); @@ -938,6 +937,9 @@ void blk_unregister_queue(struct gendisk *disk) queue_flag_clear_unlocked(QUEUE_FLAG_REGISTERED, q); + wbt_exit(q); + + if (q->mq_ops) blk_mq_unregister_dev(disk_to_dev(disk), q);