提交 6251b754 编写于 作者: Y Yufen Yu 提交者: Jens Axboe

block: remove redundant mq check

elv_support_iosched() will check queue_is_mq() for us. So, remove
the redundant check to clean code.
Signed-off-by: NYufen Yu <yuyufen@huawei.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 dd1c372d
...@@ -615,7 +615,7 @@ int elevator_switch_mq(struct request_queue *q, ...@@ -615,7 +615,7 @@ int elevator_switch_mq(struct request_queue *q,
static inline bool elv_support_iosched(struct request_queue *q) static inline bool elv_support_iosched(struct request_queue *q)
{ {
if (!q->mq_ops || if (!queue_is_mq(q) ||
(q->tag_set && (q->tag_set->flags & BLK_MQ_F_NO_SCHED))) (q->tag_set && (q->tag_set->flags & BLK_MQ_F_NO_SCHED)))
return false; return false;
return true; return true;
...@@ -763,7 +763,7 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name, ...@@ -763,7 +763,7 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name,
{ {
int ret; int ret;
if (!queue_is_mq(q) || !elv_support_iosched(q)) if (!elv_support_iosched(q))
return count; return count;
ret = __elevator_change(q, name); ret = __elevator_change(q, name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册