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 @@ -794,10 +794,8 @@ int blk_register_queue(struct gendisk *disk)
794794 * faster to shut down and is made fully functional here as
795795 * request_queues for non-existent devices never get registered.
796796 */
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 );
801799
802800 return ret ;
803801
Original file line number Diff line number Diff line change @@ -722,13 +722,10 @@ void del_gendisk(struct gendisk *disk)
722722 * If the disk does not own the queue, allow using passthrough requests
723723 * again. Else leave the queue frozen to fail all I/O.
724724 */
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 ))
727726 __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 );
732729
733730 if (start_drain )
734731 blk_unfreeze_release_lock (q , true, queue_dying );
You can’t perform that action at this time.
0 commit comments