block: get rid of blk_queued_rq()
authorJens Axboe <axboe@kernel.dk>
Wed, 24 Oct 2018 16:48:12 +0000 (10:48 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 7 Nov 2018 20:42:33 +0000 (13:42 -0700)
No point in hiding what this does, just open code it in the
one spot where we are still using it.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
include/linux/blkdev.h

index 2600cba56408bd1fa30ca6be8e2c74c7d9dc13bc..b49f5bd86f420d34457bad65db521c8108eb5e52 100644 (file)
@@ -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 */
        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);
 }
 EXPORT_SYMBOL(blk_mq_requeue_request);
index e0c661a95c39d1280d0e0ff6d77ea3a665e8da85..c675e2b5af620b99a182cccee8670c38917cd304 100644 (file)
@@ -673,8 +673,6 @@ static inline bool blk_account_rq(struct request *rq)
 
 #define blk_rq_cpu_valid(rq)   ((rq)->cpu != -1)
 #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)