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 @@ -842,10 +842,8 @@ int blk_register_queue(struct gendisk *disk)
842
842
* faster to shut down and is made fully functional here as
843
843
* request_queues for non-existent devices never get registered.
844
844
*/
845
- if (!blk_queue_init_done (q )) {
846
- blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q );
847
- percpu_ref_switch_to_percpu (& q -> q_usage_counter );
848
- }
845
+ blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q );
846
+ percpu_ref_switch_to_percpu (& q -> q_usage_counter );
849
847
850
848
return ret ;
851
849
Original file line number Diff line number Diff line change @@ -710,13 +710,10 @@ void del_gendisk(struct gendisk *disk)
710
710
* If the disk does not own the queue, allow using passthrough requests
711
711
* again. Else leave the queue frozen to fail all I/O.
712
712
*/
713
- if (!test_bit (GD_OWNS_QUEUE , & disk -> state )) {
714
- blk_queue_flag_clear (QUEUE_FLAG_INIT_DONE , q );
713
+ if (!test_bit (GD_OWNS_QUEUE , & disk -> state ))
715
714
__blk_mq_unfreeze_queue (q , true);
716
- } else {
717
- if (queue_is_mq (q ))
718
- blk_mq_exit_queue (q );
719
- }
715
+ else if (queue_is_mq (q ))
716
+ blk_mq_exit_queue (q );
720
717
}
721
718
EXPORT_SYMBOL (del_gendisk );
722
719
You can’t perform that action at this time.
0 commit comments