block: move blk_get_flush_queue to blk-flush.c

blk_get_flush_queue is only used in blk-flush.c, so move it there.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211123185312.1432157-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Christoph Hellwig 2021-11-23 19:53:05 +01:00 committed by Jens Axboe
parent 35c90e6ec9
commit 0281ed3cf4
2 changed files with 6 additions and 6 deletions

View File

@ -95,6 +95,12 @@ enum {
static void blk_kick_flush(struct request_queue *q, static void blk_kick_flush(struct request_queue *q,
struct blk_flush_queue *fq, unsigned int flags); struct blk_flush_queue *fq, unsigned int flags);
static inline struct blk_flush_queue *
blk_get_flush_queue(struct request_queue *q, struct blk_mq_ctx *ctx)
{
return blk_mq_map_queue(q, REQ_OP_FLUSH, ctx)->fq;
}
static unsigned int blk_flush_policy(unsigned long fflags, struct request *rq) static unsigned int blk_flush_policy(unsigned long fflags, struct request *rq)
{ {
unsigned int policy = 0; unsigned int policy = 0;

View File

@ -35,12 +35,6 @@ extern struct kmem_cache *blk_requestq_cachep;
extern struct kobj_type blk_queue_ktype; extern struct kobj_type blk_queue_ktype;
extern struct ida blk_queue_ida; extern struct ida blk_queue_ida;
static inline struct blk_flush_queue *
blk_get_flush_queue(struct request_queue *q, struct blk_mq_ctx *ctx)
{
return blk_mq_map_queue(q, REQ_OP_FLUSH, ctx)->fq;
}
static inline void __blk_get_queue(struct request_queue *q) static inline void __blk_get_queue(struct request_queue *q)
{ {
kobject_get(&q->kobj); kobject_get(&q->kobj);