block: remove redundant req_op in blk_rq_is_passthrough
authorLi Nan <linan122@huawei.com>
Mon, 22 May 2023 08:53:55 +0000 (16:53 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 23 May 2023 17:09:26 +0000 (11:09 -0600)
op &= REQ_OP_MASK in blk_op_is_passthrough() is exactly what req_op() do.
Therefore, it is redundant to call req_op() for blk_op_is_passthrough().

Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20230522085355.1740772-1-linan666@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/blk-mq.h

index d778cb6b211233d534b1b753b259339e73380dac..59b52ec155b1b87d94db2dff97ff2aefcde42f17 100644 (file)
@@ -201,7 +201,7 @@ static inline enum req_op req_op(const struct request *req)
 
 static inline bool blk_rq_is_passthrough(struct request *rq)
 {
-       return blk_op_is_passthrough(req_op(rq));
+       return blk_op_is_passthrough(rq->cmd_flags);
 }
 
 static inline unsigned short req_get_ioprio(struct request *req)