diff options
author | Yufen Yu <yuyufen@huawei.com> | 2020-10-09 05:26:28 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-10-09 20:34:06 +0200 |
commit | 6251b754f5b29d44d088cc73f508d15ddfb8d978 (patch) | |
tree | b75e9ee83402c8ba6e857106c259c6d01d6d489f /block | |
parent | block: invoke blk_mq_exit_sched no matter whether have .exit_sched (diff) | |
download | linux-6251b754f5b29d44d088cc73f508d15ddfb8d978.tar.xz linux-6251b754f5b29d44d088cc73f508d15ddfb8d978.zip |
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: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/elevator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/elevator.c b/block/elevator.c index 7d76b61e157a..b506895b34c7 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -615,7 +615,7 @@ out: 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))) return false; return true; @@ -763,7 +763,7 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name, { int ret; - if (!queue_is_mq(q) || !elv_support_iosched(q)) + if (!elv_support_iosched(q)) return count; ret = __elevator_change(q, name); |