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)
858
858
* faster to shut down and is made fully functional here as
859
859
* request_queues for non-existent devices never get registered.
860
860
*/
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 );
865
863
866
864
return ret ;
867
865
Original file line number Diff line number Diff line change @@ -685,13 +685,10 @@ void del_gendisk(struct gendisk *disk)
685
685
* If the disk does not own the queue, allow using passthrough requests
686
686
* again. Else leave the queue frozen to fail all I/O.
687
687
*/
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 ))
690
689
__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 );
695
692
}
696
693
EXPORT_SYMBOL (del_gendisk );
697
694
You can’t perform that action at this time.
0 commit comments