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)
839839 * faster to shut down and is made fully functional here as
840840 * request_queues for non-existent devices never get registered.
841841 */
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 );
846844
847845 return ret ;
848846
Original file line number Diff line number Diff line change @@ -717,13 +717,10 @@ void del_gendisk(struct gendisk *disk)
717717 * If the disk does not own the queue, allow using passthrough requests
718718 * again. Else leave the queue frozen to fail all I/O.
719719 */
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 ))
722721 __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 );
727724}
728725EXPORT_SYMBOL (del_gendisk );
729726
You can’t perform that action at this time.
0 commit comments