summaryrefslogtreecommitdiffstats
path: root/block/blk-flush.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-11-23 19:53:05 +0100
committerJens Axboe <axboe@kernel.dk>2021-11-29 14:38:44 +0100
commit0281ed3cf44d2a7061ec3c1680e1f86e55ad57b9 (patch)
treea807951a3b5c1a339a5d91dd0dc47605c6c80392 /block/blk-flush.c
parentblk_mq: remove repeated includes (diff)
downloadlinux-0281ed3cf44d2a7061ec3c1680e1f86e55ad57b9.tar.xz
linux-0281ed3cf44d2a7061ec3c1680e1f86e55ad57b9.zip
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>
Diffstat (limited to 'block/blk-flush.c')
-rw-r--r--block/blk-flush.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c
index 1fce6d16e6d3..86ee50455e41 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -95,6 +95,12 @@ enum {
static void blk_kick_flush(struct request_queue *q,
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)
{
unsigned int policy = 0;