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 @@ -810,10 +810,8 @@ int blk_register_queue(struct gendisk *disk)
810810 * faster to shut down and is made fully functional here as
811811 * request_queues for non-existent devices never get registered.
812812 */
813- if (!blk_queue_init_done (q )) {
814- blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q );
815- percpu_ref_switch_to_percpu (& q -> q_usage_counter );
816- }
813+ blk_queue_flag_set (QUEUE_FLAG_INIT_DONE , q );
814+ percpu_ref_switch_to_percpu (& q -> q_usage_counter );
817815
818816 return ret ;
819817
Original file line number Diff line number Diff line change @@ -742,13 +742,10 @@ void del_gendisk(struct gendisk *disk)
742742 * If the disk does not own the queue, allow using passthrough requests
743743 * again. Else leave the queue frozen to fail all I/O.
744744 */
745- if (!test_bit (GD_OWNS_QUEUE , & disk -> state )) {
746- blk_queue_flag_clear (QUEUE_FLAG_INIT_DONE , q );
745+ if (!test_bit (GD_OWNS_QUEUE , & disk -> state ))
747746 __blk_mq_unfreeze_queue (q , true);
748- } else {
749- if (queue_is_mq (q ))
750- blk_mq_exit_queue (q );
751- }
747+ else if (queue_is_mq (q ))
748+ blk_mq_exit_queue (q );
752749
753750 if (start_drain )
754751 blk_unfreeze_release_lock (q , true, queue_dying );
You can’t perform that action at this time.
0 commit comments