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