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 @@ -794,10 +794,8 @@ int blk_register_queue(struct gendisk *disk)
794
794
* faster to shut down and is made fully functional here as
795
795
* request_queues for non-existent devices never get registered.
796
796
*/
797
- if (!blk_queue_init_done (q )) {
798
- blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q );
799
- percpu_ref_switch_to_percpu (& q -> q_usage_counter );
800
- }
797
+ blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q );
798
+ percpu_ref_switch_to_percpu (& q -> q_usage_counter );
801
799
802
800
return ret ;
803
801
Original file line number Diff line number Diff line change @@ -722,13 +722,10 @@ void del_gendisk(struct gendisk *disk)
722
722
* If the disk does not own the queue, allow using passthrough requests
723
723
* again. Else leave the queue frozen to fail all I/O.
724
724
*/
725
- if (!test_bit (GD_OWNS_QUEUE , & disk -> state )) {
726
- blk_queue_flag_clear (QUEUE_FLAG_INIT_DONE , q );
725
+ if (!test_bit (GD_OWNS_QUEUE , & disk -> state ))
727
726
__blk_mq_unfreeze_queue (q , true);
728
- } else {
729
- if (queue_is_mq (q ))
730
- blk_mq_exit_queue (q );
731
- }
727
+ else if (queue_is_mq (q ))
728
+ blk_mq_exit_queue (q );
732
729
733
730
if (start_drain )
734
731
blk_unfreeze_release_lock (q , true, queue_dying );
You can’t perform that action at this time.
0 commit comments