Re: [PATCH] block: remove redundant mq check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gently ping.

On 2020/9/16 19:17, Yufen Yu wrote:
elv_support_iosched() will check queue_is_mq() for us. So, remove
the redundant check to clean code.

Signed-off-by: Yufen Yu <yuyufen@xxxxxxxxxx>
---
  block/elevator.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/elevator.c b/block/elevator.c
index f0db80fec5a4..b564129a9f2d 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -616,7 +616,7 @@ int elevator_switch_mq(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)))
  		return false;
  	return true;
@@ -764,7 +764,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);




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux