File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -858,10 +858,8 @@ int blk_register_queue(struct gendisk *disk)
858858 * faster to shut down and is made fully functional here as
859859 * request_queues for non-existent devices never get registered.
860860 */
861- if (!blk_queue_init_done (q )) {
862- blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q );
863- percpu_ref_switch_to_percpu (& q -> q_usage_counter );
864- }
861+ blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q );
862+ percpu_ref_switch_to_percpu (& q -> q_usage_counter );
865863
866864 return ret ;
867865
Original file line number Diff line number Diff line change @@ -685,13 +685,10 @@ void del_gendisk(struct gendisk *disk)
685685 * If the disk does not own the queue, allow using passthrough requests
686686 * again. Else leave the queue frozen to fail all I/O.
687687 */
688- if (!test_bit (GD_OWNS_QUEUE , & disk -> state )) {
689- blk_queue_flag_clear (QUEUE_FLAG_INIT_DONE , q );
688+ if (!test_bit (GD_OWNS_QUEUE , & disk -> state ))
690689 __blk_mq_unfreeze_queue (q , true);
691- } else {
692- if (queue_is_mq (q ))
693- blk_mq_exit_queue (q );
694- }
690+ else if (queue_is_mq (q ))
691+ blk_mq_exit_queue (q );
695692}
696693EXPORT_SYMBOL (del_gendisk );
697694
You can’t perform that action at this time.
0 commit comments