File tree 2 files changed +5
-10
lines changed 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -810,10 +810,8 @@ int blk_register_queue(struct gendisk *disk)
810
810
* faster to shut down and is made fully functional here as
811
811
* request_queues for non-existent devices never get registered.
812
812
*/
813
- if (!blk_queue_init_done (q )) {
814
- blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q );
815
- percpu_ref_switch_to_percpu (& q -> q_usage_counter );
816
- }
813
+ blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q );
814
+ percpu_ref_switch_to_percpu (& q -> q_usage_counter );
817
815
818
816
return ret ;
819
817
Original file line number Diff line number Diff line change @@ -742,13 +742,10 @@ void del_gendisk(struct gendisk *disk)
742
742
* If the disk does not own the queue, allow using passthrough requests
743
743
* again. Else leave the queue frozen to fail all I/O.
744
744
*/
745
- if (!test_bit (GD_OWNS_QUEUE , & disk -> state )) {
746
- blk_queue_flag_clear (QUEUE_FLAG_INIT_DONE , q );
745
+ if (!test_bit (GD_OWNS_QUEUE , & disk -> state ))
747
746
__blk_mq_unfreeze_queue (q , true);
748
- } else {
749
- if (queue_is_mq (q ))
750
- blk_mq_exit_queue (q );
751
- }
747
+ else if (queue_is_mq (q ))
748
+ blk_mq_exit_queue (q );
752
749
753
750
if (start_drain )
754
751
blk_unfreeze_release_lock (q , true, queue_dying );
You can’t perform that action at this time.
0 commit comments