mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 01:34:00 +08:00
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>
This commit is contained in:
parent
dd1c372d65
commit
6251b754f5
@ -615,7 +615,7 @@ out:
|
|||||||
|
|
||||||
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,
|
|||||||
{
|
{
|
||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user