Commit 7d692330 authored by Jens Axboe's avatar Jens Axboe

block: get rid of blk_queued_rq()

No point in hiding what this does, just open code it in the
one spot where we are still using it.
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Tested-by: default avatarMing Lei <ming.lei@redhat.com>
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8b98a97f
...@@ -692,7 +692,7 @@ void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list) ...@@ -692,7 +692,7 @@ void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list)
/* this request will be re-inserted to io scheduler queue */ /* this request will be re-inserted to io scheduler queue */
blk_mq_sched_requeue_request(rq); blk_mq_sched_requeue_request(rq);
BUG_ON(blk_queued_rq(rq)); BUG_ON(!list_empty(&rq->queuelist));
blk_mq_add_to_requeue_list(rq, true, kick_requeue_list); blk_mq_add_to_requeue_list(rq, true, kick_requeue_list);
} }
EXPORT_SYMBOL(blk_mq_requeue_request); EXPORT_SYMBOL(blk_mq_requeue_request);
......
...@@ -673,8 +673,6 @@ static inline bool blk_account_rq(struct request *rq) ...@@ -673,8 +673,6 @@ static inline bool blk_account_rq(struct request *rq)
#define blk_rq_cpu_valid(rq) ((rq)->cpu != -1) #define blk_rq_cpu_valid(rq) ((rq)->cpu != -1)
#define blk_bidi_rq(rq) ((rq)->next_rq != NULL) #define blk_bidi_rq(rq) ((rq)->next_rq != NULL)
/* rq->queuelist of dequeued request must be list_empty() */
#define blk_queued_rq(rq) (!list_empty(&(rq)->queuelist))
#define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment