Re: [PATCH] block: Fix elevator_get_default() to check for null q->tag_set

From: Christoph Hellwig
Date: Mon Oct 07 2024 - 01:53:48 EST


> static struct elevator_type *elevator_get_default(struct request_queue *q)
> {
> - if (q->tag_set && q->tag_set->flags & BLK_MQ_F_NO_SCHED_BY_DEFAULT)
> - return NULL;
> + if (q->tag_set) {

q->tag_set can't be NULL for a blk-mq queue. So you can just remove
the q->tag_set check here and also in elv_support_iosched.