提交 28a1ae6b 编写于 作者: C Christoph Hellwig 提交者: Jens Axboe

blk-mq: remove blk_qc_t_valid

Move the trivial check into the only caller.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
Reviewed-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Tested-by: NMark Wunderlich <mark.wunderlich@intel.com>
Link: https://lore.kernel.org/r/20211012111226.760968-9-hch@lst.deSigned-off-by: NJens Axboe <axboe@kernel.dk>
上级 efbabbe1
......@@ -4098,7 +4098,7 @@ static int blk_mq_poll_classic(struct request_queue *q, blk_qc_t cookie,
*/
int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin)
{
if (!blk_qc_t_valid(cookie) ||
if (cookie == BLK_QC_T_NONE ||
!test_bit(QUEUE_FLAG_POLL, &q->queue_flags))
return 0;
......
......@@ -500,11 +500,6 @@ typedef unsigned int blk_qc_t;
#define BLK_QC_T_SHIFT 16
#define BLK_QC_T_INTERNAL (1U << 31)
static inline bool blk_qc_t_valid(blk_qc_t cookie)
{
return cookie != BLK_QC_T_NONE;
}
struct blk_rq_stat {
u64 mean;
u64 min;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册